Hi Eric, On 2 Apr 2007, at 18:15, Eric Blake-1 wrote:
Even on Linux, the fflush man page doesn't mention input streams:http://www.die.net/doc/linux/man/man3/fflush.3.html So it seems that using fflush(stdin) is probably the wrong thing to do altogether for a portable application.On the contrary, it makes it sound like we write a gnulib module that implements POSIX semantics of fflush, which creates a function rpl_fflush that calls fpurge or __fpurge under the hood when the regular fflush is broken on input streams; then portable applications can assume POSIX semantics for fflush.
Agreed, that is certainly the nicest way to work around it. Cheers, Gary -- ())_. Email me: [EMAIL PROTECTED] ( '/ Read my blog: http://blog.azazil.net / )= ...and my book: http://sources.redhat.com/autobook `(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912
PGP.sig
Description: This is a digitally signed message part