m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/src/Attic/debug.c,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/src/Attic/debug.c,v [branch-1_4]
Date: Thu, 24 May 2007 17:23:45 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      07/05/24 17:23:43

Index: src/debug.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/debug.c,v
retrieving revision 1.1.1.1.2.12
retrieving revision 1.1.1.1.2.13
diff -u -b -r1.1.1.1.2.12 -r1.1.1.1.2.13
--- src/debug.c 24 May 2007 11:58:20 -0000      1.1.1.1.2.12
+++ src/debug.c 24 May 2007 17:23:43 -0000      1.1.1.1.2.13
@@ -180,22 +180,19 @@
      next character on exit (but places no restrictions on the file
      pointer location on a non-seekable file).  It also requires that
      fflush() followed by fseeko() on an input file set the underlying
-     file pointer.  However, fflush() on a non-seekable file can lose
-     buffered data, which we might otherwise want to process after
-     syscmd.  Hence, we must check whether stdin is seekable.  We must
-     also be tolerant of operating with stdin closed, so we don't
-     report any failures in this attempt.  The stdio-safer module and
-     friends are essential, so that if stdin was closed, this lseek is
-     not on some other file that we have since opened.  Mingw has bugs
-     when using fseek on text files, so we only strive for POSIX
-     behavior when we detect a UNIX environment, until gnulib is improved.  */
-#if UNIX
+     file pointer, and gnulib guarantees these semantics.  However,
+     fflush() on a non-seekable file can lose buffered data, which we
+     might otherwise want to process after syscmd.  Hence, we must
+     check whether stdin is seekable.  We must also be tolerant of
+     operating with stdin closed, so we don't report any failures in
+     this attempt.  The stdio-safer module and friends are essential,
+     so that if stdin was closed, this lseek is not on some other file
+     that we have since opened.  */
   if (lseek (STDIN_FILENO, 0, SEEK_CUR) >= 0
       && fflush (stdin) == 0)
     {
       fseeko (stdin, 0, SEEK_CUR);
     }
-#endif /* UNIX */
 }
 
 /*-------------------------------------------------------------------------.




reply via email to

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