[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: seekable stdin test failure on OS X

From: Eric Blake-1
Subject: Re: seekable stdin test failure on OS X
Date: Mon, 2 Apr 2007 10:20:23 -0700 (PDT)

> > 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: 
Sent from the Gnu - M4 - Bugs mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]