[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/m4/system_.h,v
From: |
Eric Blake |
Subject: |
Changes to m4/m4/system_.h,v |
Date: |
Tue, 26 Sep 2006 13:19:32 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/09/26 13:19:26
Index: m4/system_.h
===================================================================
RCS file: /sources/m4/m4/m4/system_.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- m4/system_.h 22 Aug 2006 16:16:47 -0000 1.14
+++ m4/system_.h 26 Sep 2006 13:19:26 -0000 1.15
@@ -34,12 +34,6 @@
@INCLUDE_ERROR_H@
@INCLUDE_OBSTACK_H@
@INCLUDE_REGEX_H@
-
-/* These are not in m4's namespace so for safety undefine any errant
- definitions before including stdbool.h. */
-#undef bool
-#undef false
-#undef true
@INCLUDE_STDBOOL_H@
#include <gnu/exit.h>
@@ -83,29 +77,28 @@
-/* Canonicalise Windows and Cygwin recognition macros. */
-#if defined __CYGWIN32__ && !defined __CYGWIN__
-# define __CYGWIN__ __CYGWIN32__
-#endif
-#if defined _WIN32 && !defined WIN32
-# define WIN32 _WIN32
-#endif
-
-#if defined WIN32 && !defined __CYGWIN__
-/* M4_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
- separator when it is set. */
-# define M4_DIRSEP_CHAR '\\'
-# define M4_PATHSEP_CHAR ';'
-#endif
-#ifndef M4_PATHSEP_CHAR
-# define M4_PATHSEP_CHAR ':'
+/* Canonicalize UNIX recognition macros. */
+#if defined unix || defined __unix || defined __unix__ \
+ || defined _POSIX_VERSION || defined _POSIX2_VERSION \
+ || defined __NetBSD__ || defined __OpenBSD__ \
+ || defined __APPLE__ || defined __APPLE_CC__
+# define UNIX 1
+#endif
+
+/* Canonicalize Windows recognition macros. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# define W32_NATIVE 1
+#endif
+
+/* Canonicalize OS/2 recognition macro. */
+#ifdef __EMX__
+# define OS2 1
#endif
-
/* M4_STMT_START/END are used to create macros which expand to a
a single compound statement in a portable way, but crucially in
- a way sympathetic to the compiler to maximise optimisation. */
+ a way sympathetic to the compiler to maximise optimization. */
#undef M4_STMT_START
#undef M4_STMT_END
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
@@ -123,20 +116,21 @@
-/* Take advantage of GNU C compiler source level optimisation hints,
+/* Take advantage of GNU C compiler source level optimization hints,
using portable macros. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6)
# define M4_GNUC_ATTRIBUTE(args) __attribute__(args)
#else
# define M4_GNUC_ATTRIBUTE(args)
#endif /* __GNUC__ */
-#define M4_GNUC_PRINTF(fmt, arg) M4_GNUC_ATTRIBUTE((format (printf, fmt, arg)))
-#define M4_GNUC_SCANF(fmt, arg) M4_GNUC_ATTRIBUTE((format (scanf, fmt,
arg)))
-#define M4_GNUC_FORMAT(arg_idx) M4_GNUC_ATTRIBUTE((format_arg
(arg_idx)))
-#define M4_GNUC_NORETURN M4_GNUC_ATTRIBUTE((noreturn))
-#define M4_GNUC_CONST M4_GNUC_ATTRIBUTE((const))
-#define M4_GNUC_UNUSED M4_GNUC_ATTRIBUTE((unused))
+#define M4_GNUC_PRINTF(fmt, arg) \
+ M4_GNUC_ATTRIBUTE((__format__ (__printf__, fmt, arg)))
+#define M4_GNUC_SCANF(fmt, arg) \
+ M4_GNUC_ATTRIBUTE((__format__ (__scanf__, fmt, arg)))
+#define M4_GNUC_NORETURN M4_GNUC_ATTRIBUTE((__noreturn__))
+#define M4_GNUC_CONST M4_GNUC_ATTRIBUTE((__const__))
+#define M4_GNUC_UNUSED M4_GNUC_ATTRIBUTE((__unused__))
- Changes to m4/m4/system_.h,v,
Eric Blake <=