I imported the fclose module into m4 just prior to releasing m4 1.4.16, on the advice of GNULIB_POSIXCHECK. The gnulib fclose module replaces fclose if and only if close is also replaced, which is the case on mingw if sockets might be involved. However, the fclose module blindly calls fflush(), even on input streams, and then makes fclose() fail if fflush() fails (which it does for non-seekable input streams). Thus, where m4 on mingw used to use the system fclose() and safely close stdin, it is now using the replacement fclose() and complaining about an EBADF failure that fclose() propagated up from an inappropriate fflush(), then reflecting that into m4 exit status. In reality, within the replacement fclose(), the fflush() should only be attempted only after verifying the stream was doing output or is seekable. I'm working on a patch now...
-- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature