> > So it seems that using fflush(stdin) is probably the wrong thing > > to do altogether for a portable application. > > ISO C89 and C99 say that fflush(stdin) yields undefined behavior, > so I'm inclined to agree.
On the other hand, the next version of POSIX has this explicit wording, shaded CX meaning that it is a C extension: CX For a stream open for reading, if the file is not already at EOF, and the file is one capable of seeking, the file offset of the underlying open file description shall be adjusted so that the next operation on the open file description deals with the byte after the last one read from or written to the stream being flushed. -- Eric Blake -- View this message in context: http://www.nabble.com/seekable-stdin-test-failure-on-OS-X-tf3481522.html#a9795055 Sent from the Gnu - M4 - Bugs mailing list archive at Nabble.com. _______________________________________________ Bug-m4 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-m4
