diff options
author | Eric Blake <ebb9@byu.net> | 2008-04-14 17:14:33 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-04-14 17:14:33 -0600 |
commit | 03c4e545afedafff51cce3a73aec5172482c0120 (patch) | |
tree | 6e67f4a87b8d0affdb0f8274e304d7f14fdfb613 | |
parent | eef195f8cdc361d819914e82fcf2b0bdf559000c (diff) | |
download | m4-03c4e545afedafff51cce3a73aec5172482c0120.tar.gz |
Improve OS/2 detection.
* modules/gnu.c (m4_macro_table): Ensure all possible identifiers
are defined, not just the first. The testsuite ensures that
exactly one gets defined.
* m4/system_.h [__EMX__]: OS/2 is not Unix-compatible, no matter
what other pre-defined macros it has.
* THANKS: Update.
Reported by Elbert Pol.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | m4/system_.h | 4 | ||||
-rw-r--r-- | modules/gnu.c | 8 |
4 files changed, 18 insertions, 5 deletions
@@ -1,5 +1,14 @@ 2008-04-14 Eric Blake <ebb9@byu.net> + Improve OS/2 detection. + * modules/gnu.c (m4_macro_table): Ensure all possible identifiers + are defined, not just the first. The testsuite ensures that + exactly one gets defined. + * m4/system_.h [__EMX__]: OS/2 is not Unix-compatible, no matter + what other pre-defined macros it has. + * THANKS: Update. + Reported by Elbert Pol. + Ensure __m4_version__ is unquoted. * tests/builtins.at (__m4_@&t@version__): Augment test. @@ -37,6 +37,7 @@ Dan Jacobson jidanni@jidanni.org Daniel Richard G. skunk@iskunk.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 @@ -78,6 +79,7 @@ Keith Bostic bostic@abyssinian.sleepycat.com Konrad Schwarz konrad.schwarz@siemens.com Kristine Lund lund@lpnaxp.in2p3.fr Krste Asanovic krste@icsi.berkeley.edu +Lawson Chan Lawson.Chan@tdsecurities.com M. Levinson levinsm@users.sourceforge.net Marcus Daniels marcus@ee.pdx.edu Marion Hakanson hakanson@cse.ogi.edu diff --git a/m4/system_.h b/m4/system_.h index f1e96024..2c9e1a7c 100644 --- a/m4/system_.h +++ b/m4/system_.h @@ -1,5 +1,6 @@ /* GNU m4 -- A simple macro processor - Copyright (C) 2000, 2001, 2003, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003, 2006, 2007, 2008 Free Software + Foundation, Inc. This file is part of GNU M4. @@ -104,6 +105,7 @@ BEGIN_C_DECLS /* Canonicalize OS/2 recognition macro. */ #ifdef __EMX__ # define OS2 1 +# undef UNIX #endif diff --git a/modules/gnu.c b/modules/gnu.c index 1cf4a600..b481581a 100644 --- a/modules/gnu.c +++ b/modules/gnu.c @@ -85,12 +85,12 @@ m4_macro m4_macro_table[] = /* name text min max */ #if UNIX { "__unix__", "", 0, 0 }, -#elif W32_NATIVE +#endif +#if W32_NATIVE { "__windows__", "", 0, 0 }, -#elif OS2 +#endif +#if OS2 { "__os2__", "", 0, 0 }, -#else -# warning Platform macro not provided #endif { "__gnu__", "", 0, 0 }, { "__m4_version__", VERSION,0, 0 }, |