-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 7/18/2009 6:48 AM: >> it (although with #if _LIBC guards to make upstream adoption easier). >> >> How about this patch? It was enough to fix the behavior of m4 on cygwin > > I have a slight preference for omitting the #if !_LIBC guards, > and thus adopting the improvement unconditionally whenever error.c is used. > The added fcntl call has minimal cost (at least that's my recollection > from back when I measured it), and in the unusual case of already-closed > stdout, there will be no failing close syscall to distract readers of > strace output logs.
The #if !_LIBC code is guarding a new fcntl syscall, but there is nothing in my patch that reduces the number of close syscalls (rather, it is a matter of avoiding fflush, which already has no syscalls on glibc if there is nothing to do). I don't see any reason to remove the guard, unless the glibc maintainers think otherwise. At any rate, I've also created the glibc bug report: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10412 > But either way is fine. I pushed my patch as-is to gnulib. - -- 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 iEYEARECAAYFAkphy3EACgkQ84KuGfSFAYCezgCfdLkOq1wN2hDm/R3bdb9oQs3n 5lsAn2tao/yeROtz4BxKIuTbP8l9kQZ6 =xPRX -----END PGP SIGNATURE-----