Eric Blake wrote:
> > On HP-UX 11:
> > When reading from the pipe:
> > c = '#'
> > c = 'i'
> > ungetc result = '@'
> > c = <EOF>
> > c = <EOF>
> 
> Bug - C99 requires that ALL streams have at least one byte of ungetc space, 
> with no limitation on what can go in that buffer.  You only invoke 
> unspecified 
> behavior when you use ungetc() multiple times in a row.

HP-UX 11 supports ungetc. The <EOF> appears because of the fflush() call
and because the input has less than 8192 bytes. But fflush() on a non-
seekable input stream is undefined behaviour anyway, so it cannot count as
a bug, right?

Bruno



Reply via email to