m4-commit
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Changes to m4/src/Attic/builtin.c,v [branch-1_4]
Date: Sun, 18 Jun 2006 21:31:57 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/06/18 21:31:57

Index: src/builtin.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/builtin.c,v
retrieving revision 1.1.1.1.2.11
retrieving revision 1.1.1.1.2.12
diff -u -b -r1.1.1.1.2.11 -r1.1.1.1.2.12
--- src/builtin.c       15 Jun 2006 21:51:37 -0000      1.1.1.1.2.11
+++ src/builtin.c       18 Jun 2006 21:31:56 -0000      1.1.1.1.2.12
@@ -745,6 +745,10 @@
 | and "sysval".  "esyscmd" is GNU specific.                              |
 `------------------------------------------------------------------------*/
 
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(status) (((status) >> 8) & 0xff)
+#endif
+
 /* Exit code from last "syscmd" command.  */
 static int sysval;
 
@@ -774,7 +778,7 @@
     {
       M4ERROR ((warning_status, errno,
                "Cannot open pipe to command \"%s\"", ARG (1)));
-      sysval = 0xff << 8;
+      sysval = 0xffff;
     }
   else
     {
@@ -787,7 +791,7 @@
 static void
 m4_sysval (struct obstack *obs, int argc, token_data **argv)
 {
-  shipout_int (obs, (sysval >> 8) & 0xff);
+  shipout_int (obs, WEXITSTATUS (sysval));
 }
 
 /*-------------------------------------------------------------------------.




reply via email to

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