[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/modules/m4.c,v
From: |
Eric Blake |
Subject: |
Changes to m4/modules/m4.c,v |
Date: |
Thu, 24 May 2007 18:02:55 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 07/05/24 18:02:54
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- modules/m4.c 24 May 2007 12:54:13 -0000 1.107
+++ modules/m4.c 24 May 2007 18:02:54 -0000 1.108
@@ -510,22 +510,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. */
-#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 */
}
M4BUILTIN_HANDLER (syscmd)