[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability to BeOS
From: |
Eric Blake |
Subject: |
Re: portability to BeOS |
Date: |
Mon, 08 May 2006 21:40:16 -0600 |
User-agent: |
Thunderbird 1.5.0.2 (Windows/20060308) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[Adding m4-patches]
Hi Bruno,
According to Bruno Haible on 5/2/2006 8:26 AM:
> Here is the fix, ported to the current m4 CVS.
>
>
> 2006-04-30 Bruno Haible <address@hidden>
>
> * modules/m4.c (WEXITSTATUS): Provide fallback definition.
> (sysval): Use WEXITSTATUS.
> * modules/gnu.c (esyscmd): Set sysval to 0xffff, to accomodate both
> big-endian and little-endian wait status definitions.
Thanks for the patch. The patch was still trivial enough to not need
copyright paperwork, so I applied it with minor formatting changes (as
attached).
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEYA8f84KuGfSFAYARAgfiAJ0Y1KEK3LLG+QzF6CSPl3BKbRVI2QCdGfu+
QWClrkc9ugnbAMh0o1laB9U=
=fMz8
-----END PGP SIGNATURE-----
Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.37
diff -u -p -r1.37 gnu.c
--- modules/gnu.c 8 May 2005 00:37:44 -0000 1.37
+++ modules/gnu.c 9 May 2006 03:36:36 -0000
@@ -1,6 +1,5 @@
/* GNU m4 -- A simple macro processor
-
- Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -557,7 +556,7 @@ M4BUILTIN_HANDLER (esyscmd)
{
M4ERROR ((m4_get_warning_status_opt (context), errno,
_("Cannot open pipe to command `%s'"), M4ARG (1)));
- m4_set_sysval (0xff << 8);
+ m4_set_sysval (0xffff);
}
else
{
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.60
diff -u -p -r1.60 m4.c
--- modules/m4.c 4 May 2005 18:56:36 -0000 1.60
+++ modules/m4.c 9 May 2006 03:36:36 -0000
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -426,6 +426,10 @@ M4BUILTIN_HANDLER (defn)
/* Exit code from last "syscmd" command. */
int m4_sysval = 0;
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(status) (((status) >> 8) & 0xff)
+#endif
+
void
m4_set_sysval (int value)
{
@@ -451,7 +455,7 @@ M4BUILTIN_HANDLER (syscmd)
M4BUILTIN_HANDLER (sysval)
{
- m4_shipout_int (obs, (m4_sysval >> 8) & 0xff);
+ m4_shipout_int (obs, WEXITSTATUS (m4_sysval));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: portability to BeOS,
Eric Blake <=