m4-commit
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Changes to m4/src/Attic/output.c,v [branch-1_4]
Date: Sun, 22 Jul 2007 04:40:17 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      07/07/22 04:40:16

Index: src/output.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/output.c,v
retrieving revision 1.1.1.1.2.23
retrieving revision 1.1.1.1.2.24
diff -u -b -r1.1.1.1.2.23 -r1.1.1.1.2.24
--- src/output.c        5 Jul 2007 03:53:08 -0000       1.1.1.1.2.23
+++ src/output.c        22 Jul 2007 04:40:16 -0000      1.1.1.1.2.24
@@ -252,6 +252,11 @@
   else if (set_cloexec_flag (fileno (file), true) != 0)
     M4ERROR ((warning_status, errno,
              "Warning: cannot protect diversion across forks"));
+  /* POSIX states that it is undefined whether an append stream starts
+     at offset 0 or at the end.  We want the beginning.  */
+  else if (fseeko (file, 0, SEEK_SET) != 0)
+    M4ERROR ((EXIT_FAILURE, errno,
+             "cannot seek to beginning of diversion"));
   return file;
 }
 




reply via email to

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