CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/06/30 18:58:12

Index: src/debug.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/debug.c,v
retrieving revision 1.1.1.1.2.3
retrieving revision 1.1.1.1.2.4
diff -u -b -r1.1.1.1.2.3 -r1.1.1.1.2.4
--- src/debug.c 23 Jun 2006 13:06:10 -0000      1.1.1.1.2.3
+++ src/debug.c 30 Jun 2006 18:58:12 -0000      1.1.1.1.2.4
@@ -148,8 +148,11 @@
       if (fstat (fileno (debug), &debug_stat) < 0)
        return;
 
+      /* mingw has a bug where fstat on a regular file reports st_ino
+        of 0.  On normal system, st_ino should never be 0.  */
       if (stdout_stat.st_ino == debug_stat.st_ino
-         && stdout_stat.st_dev == debug_stat.st_dev)
+         && stdout_stat.st_dev == debug_stat.st_dev
+         && stdout_stat.st_ino != 0)
        {
          if (debug != stderr)
            fclose (debug);


Reply via email to