bug-gnulib
[Top][All Lists]
Advanced

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

Austin group ruling on ungetc vs. fflush


From: Eric Blake
Subject: Austin group ruling on ungetc vs. fflush
Date: Fri, 09 Jan 2009 13:20:59 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A while ago, we wrote some unit tests that failed on a number of systems
with different behaviors of fflush after ungetc (particularly if you used
ungetc to push back a different byte than what was originally read).  At
the time, Bruno ended up commenting the tests out until we had an official
ruling from the POSIX folks on what should happen.

Well, the topic finally came up in yesterday's meeting:

https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=11808

For more details, browse to
http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt
and search for Enhancement Request Number 17

in particular, the new wording states that after fflush, "the file offset
of the underlying open file description shall be set to the file position
of the stream, and any characters pushed back onto the stream by ungetc()
or ungetwc() that have not subsequently been read from the stream shall be
discarded."

We ought to go ahead and reinstate the proper unit tests for these
behaviors, as well as improve the fflush and other modules (and perhaps
add an ungetc module) to make this behavior consistent across platforms.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklnsasACgkQ84KuGfSFAYCV0QCeOP5/eITpuXd+FiGsZ0UAzHou
fiYAn0a9G8yF22/YpikDzrH9PBf8DX3B
=4HNk
-----END PGP SIGNATURE-----




reply via email to

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