summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-04-11 09:53:29 -0600
committerEric Blake <ebb9@byu.net>2008-04-11 10:05:33 -0600
commit7541b497e801dc872e8034cddba77c5fa29b110f (patch)
tree1a18184f30946591cca8de06b8e1bb512d21bbd2
parentbe172ae7ca52f35dbff52d9085a85f08a54d76e1 (diff)
downloadm4-7541b497e801dc872e8034cddba77c5fa29b110f.tar.gz
Improve OS/2+emx build.
* src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible system(3), no matter what other macros it pre-defined. * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure on OS/2. * src/builtin.c (predefined_tab): Ensure all possible system identifiers are defined, not just the first; the testsuite will catch if multiple identifiers mistakenly made it through. * examples/null.m4 (esyscmd): Don't rely on printf to generate NUL byte. * examples/null.out (esyscmd): Check for esyscmd success. * THANKS: Update. Reported by Elbert Pol. Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r--ChangeLog14
-rw-r--r--THANKS1
-rw-r--r--doc/m4.texinfo10
-rw-r--r--examples/null.m4bin5747 -> 5863 bytes
-rw-r--r--examples/null.outbin402 -> 404 bytes
-rw-r--r--src/builtin.c9
-rw-r--r--src/m4.h1
7 files changed, 28 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d37aefc4..c5685ab8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2008-04-11 Eric Blake <ebb9@byu.net>
+ Improve OS/2+emx build.
+ * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
+ system(3), no matter what other macros it pre-defined.
+ * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
+ on OS/2.
+ * src/builtin.c (predefined_tab): Ensure all possible system
+ identifiers are defined, not just the first; the testsuite will
+ catch if multiple identifiers mistakenly made it through.
+ * examples/null.m4 (esyscmd): Don't rely on printf to generate NUL
+ byte.
+ * examples/null.out (esyscmd): Check for esyscmd success.
+ * THANKS: Update.
+ Reported by Elbert Pol.
+
Fix mingw build.
* src/builtin.c (define_user_macro): Avoid compiler warning.
* NEWS: Tweak 1.4.10b entry.
diff --git a/THANKS b/THANKS
index 01c560f3..ab08e6dc 100644
--- a/THANKS
+++ b/THANKS
@@ -29,6 +29,7 @@ Damian Menscher menscher@uiuc.edu
Dan Jacobson jidanni@jidanni.org
David J. MacKenzie djm@uunet.uu.net
David Perlin davep@nanosoft.com
+Elbert Pol elbert.pol@gmail.com
Erez Zadok ezk@cs.columbia.edu
Eric Allman eric@cs.berkeley.edu
Eric Backus ericb@lsid.hp.com
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 690ea79d..4a523c6c 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -6481,11 +6481,13 @@ sysval
@c the expansion.
@example
-syscmd(`rm -f foo??????')sysval
+syscmd(`rm -rf foodir')sysval
@result{}0
-len(mkstemp(`fooXXXXX'))
-@result{}9
-syscmd(`rm foo??????')sysval
+syscmd(`mkdir foodir')sysval
+@result{}0
+len(mkstemp(`foodir/fooXXXXX'))
+@result{}16
+syscmd(`rm -r foodir')sysval
@result{}0
@end example
diff --git a/examples/null.m4 b/examples/null.m4
index 79f4715f..7cf123fd 100644
--- a/examples/null.m4
+++ b/examples/null.m4
Binary files differ
diff --git a/examples/null.out b/examples/null.out
index aca4b785..cd3764f7 100644
--- a/examples/null.out
+++ b/examples/null.out
Binary files differ
diff --git a/src/builtin.c b/src/builtin.c
index 12ce2c0a..e9856a8b 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -154,11 +154,14 @@ predefined_tab[] =
{
#if UNIX
{ "unix", "__unix__", "" },
-#elif W32_NATIVE
+#endif
+#if W32_NATIVE
{ "windows", "__windows__", "" },
-#elif OS2
+#endif
+#if OS2
{ "os2", "__os2__", "" },
-#else
+#endif
+#if !UNIX && !W32_NATIVE && !OS2
# warning Platform macro not provided
#endif
{ NULL, "__gnu__", "" },
diff --git a/src/m4.h b/src/m4.h
index 3e7fc767..54dd9da1 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -69,6 +69,7 @@
/* Canonicalize OS/2 recognition macro. */
#ifdef __EMX__
# define OS2 1
+# undef UNIX
#endif
/* Used for version mismatch, when -R detects a frozen file it can't parse. */