-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cygwin 1.7 now provides fpurge, and it passes test-fpurge.c without the use of a wrapper function. Therefore, I think that it avoids the BSD bug reported here: http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00277.html
That means that blindly compiling the replacement fpurge.o is now a waste on Cygwin (it is still necessary for BSD, where fpurge is broken; for glibc, where it is spelled __fpurge and lacks a return value; and for systems that lack a native fpurge). But I'm struggling to come up with a minimal test that can be used in fpurge.m4 to detect the difference between the working Cygwin and the broken BSD fpurge implementations; the referenced email doesn't show how to expose the BSD failure, just how to work around it. And it also seems that the comment is wrong: "The following always hold: if _flags & __SRD, _w is 0." If this invariant is not fulfilled and the stream is read-write but currently writing, subsequent putc or fputc calls will write directly into the buffer, although they shouldn't be allowed to. */ But __SRD implies reading, not writing, so it seems like we need s/currently writing/not &/. - -- 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 iEYEARECAAYFAkpchZQACgkQ84KuGfSFAYBWzQCg0oyBUh2KdKhajLJxO1vf2Qo/ AZ8An1DUOzJcaTcSI4lEcKMUSgsdXBC5 =9lQy -----END PGP SIGNATURE-----