[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/modules/gnu.c,v
From: |
Eric Blake |
Subject: |
Changes to m4/modules/gnu.c,v |
Date: |
Mon, 21 Aug 2006 12:46:26 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/08/21 12:46:24
Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- modules/gnu.c 21 Aug 2006 02:37:45 -0000 1.48
+++ modules/gnu.c 21 Aug 2006 12:46:24 -0000 1.49
@@ -53,7 +53,7 @@
BUILTIN(changesyntax, false, true, 1, -1 ) \
BUILTIN(debugmode, false, false, 1, 2 ) \
BUILTIN(debugfile, false, false, 1, 2 ) \
- BUILTIN(esyscmd, false, true, 2, 2 ) \
+ BUILTIN(esyscmd, false, true, -1, 2 ) \
BUILTIN(format, false, true, 2, -1 ) \
BUILTIN(indir, false, true, 2, -1 ) \
BUILTIN(patsubst, false, true, 3, 5 ) \
@@ -468,6 +468,16 @@
FILE *pin;
int ch;
+ /* Calling with no arguments triggers a warning, but must also
+ set sysval to 0 as if the empty command had been executed.
+ Therefore, we must manually check min args ourselves rather
+ than relying on the macro calling engine. */
+ if (m4_bad_argc (context, argc, argv, 2, -1))
+ {
+ m4_set_sysval (0);
+ return;
+ }
+
m4_sysval_flush (context);
errno = 0;
pin = popen (M4ARG (1), "r");
@@ -476,7 +486,7 @@
m4_error (context, 0, errno,
_("%s: cannot open pipe to command `%s'"),
M4ARG (0), M4ARG (1));
- m4_set_sysval (0xffff);
+ m4_set_sysval (-1);
}
else
{
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/09
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/20
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/20
- Changes to m4/modules/gnu.c,v,
Eric Blake <=
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/23
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/25
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/28
- Changes to m4/modules/gnu.c,v, Eric Blake, 2006/08/30