[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU M4 1.4.4b released (beta release)
From: |
Eric Blake |
Subject: |
Re: GNU M4 1.4.4b released (beta release) |
Date: |
Sun, 18 Jun 2006 19:51:40 +0000 |
> Hello!
Hi Andreas,
>
> I tried 1.4.4b on OS/2 and found the following issues:
Thanks for the first report. Good thing I ran this beta, rather
than going straight to 1.4.5!
>
> In checks/Makefile.in a colon is used to prepend ../src to $PATH which
> doesn't work because a semicolon is needed on my system. Please, could
> you use $(PATH_SEPARATOR) instead which is provided by recent autoconf
> version? E.g.:
Your patch looked good; I'll commit it when I get a chance.
>
> Test 62.sysval fails. The reason is that m4_sysval() in builtin.c
> discards the lowest 8 bits of sysval but on OS/2 system() returns
> a value between 0 and 255.
This sounds similar to an issue that Bruno Haible patched on
CVS head for BeOS:
http://lists.gnu.org/archive/html/bug-m4/2006-05/msg00000.html
Can you try that patch, backported to 1.4.4b, to see if it also solves
the issue for OS/2? If so, I'll check it in.
2006-05-08 Bruno Haible <address@hidden> (tiny change)
Eric Blake <address@hidden>
* src/builtin.c (WEXITSTATUS): Provide fallback definition.
(m4_esyscmd): Set sysval to 0xffff, to accomodate both
big-endian and little-endian wait status definitions.
(m4_sysval): Use WEXITSTATUS.
Reported by Andreas Buening.
--
Eric Blake
Index: src/builtin.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/builtin.c,v
retrieving revision 1.1.1.1.2.11
diff -u -p -r1.1.1.1.2.11 builtin.c
--- src/builtin.c 15 Jun 2006 21:51:37 -0000 1.1.1.1.2.11
+++ src/builtin.c 18 Jun 2006 19:50:16 -0000
@@ -745,6 +745,10 @@ m4_defn (struct obstack *obs, int argc,
| 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 @@ m4_esyscmd (struct obstack *obs, int arg
{
M4ERROR ((warning_status, errno,
"Cannot open pipe to command \"%s\"", ARG (1)));
- sysval = 0xff << 8;
+ sysval = 0xffff;
}
else
{
@@ -787,7 +791,7 @@ m4_esyscmd (struct obstack *obs, int arg
static void
m4_sysval (struct obstack *obs, int argc, token_data **argv)
{
- shipout_int (obs, (sysval >> 8) & 0xff);
+ shipout_int (obs, WEXITSTATUS (sysval));
}
/*-------------------------------------------------------------------------.