-----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 e...@byu.net -----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-----