bug-gnulib
[Top][All Lists]
Advanced

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

fstat on mingw


From: Eric Blake
Subject: fstat on mingw
Date: Fri, 30 Jun 2006 12:43:22 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

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

This bit me when trying to compile m4 on mingw.  Apparently, fstat always
returns st_ino of 0 on a regular file, but m4 was trying to see if stdout
and a debug file were the same by comparing st_ino, in order to close the
debug file only if it wasn't also stdout.  As a result, debug output ended
up on stdout instead of stderr where it belonged.

OK to document this issue?

doc/ChangeLog:
2006-06-30  Eric Blake  <address@hidden>

        * functions.texi (Function Portability): Document fstat
        limitation on mingw.

- --
Life is short - so eat dessert first!

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

iD8DBQFEpXDK84KuGfSFAYARAkN1AJ9pcLaBCOLxQTUCKzkLEJhkEosDCACgnDIb
kggADloHqUnruXSeeMzATNw=
=n8u0
-----END PGP SIGNATURE-----
Index: doc/functions.texi
===================================================================
RCS file: /sources/gnulib/gnulib/doc/functions.texi,v
retrieving revision 1.4
diff -u -p -r1.4 functions.texi
--- doc/functions.texi  29 Jun 2006 22:15:49 -0000      1.4
+++ doc/functions.texi  30 Jun 2006 18:40:00 -0000
@@ -187,6 +187,9 @@ On Cygwin, @code{fstat} applied to the f
 different @code{st_ino} values, even if standard input and standard output
 are not redirected and refer to the same terminal.
 
+On mingw, @code{fstat} sets @code{st_ino} to 0 for all regular files,
+even if the file descriptors are for distinct files.
+
 @item ftime
 This function is marked as ``legacy'' in POSIX.  Better use @code{gettimeofday}
 or @code{clock_gettime} instead, and use @code{ftime} only as a fallback for

reply via email to

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