summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/_mingw.h
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2005-06-16 11:41:49 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2005-06-16 11:41:49 +0000
commitdcd6cb4308703ef1ed82d90466e31e5d3aff1994 (patch)
treef79667431dc4f64efa7e07519097b2aa1a40e2e7 /winsup/mingw/include/_mingw.h
parent7a9b2d82ec43d9704a28af6c621856997fb1b1fb (diff)
downloadcygnal-dcd6cb4308703ef1ed82d90466e31e5d3aff1994.tar.gz
cygnal-dcd6cb4308703ef1ed82d90466e31e5d3aff1994.tar.bz2
cygnal-dcd6cb4308703ef1ed82d90466e31e5d3aff1994.zip
* include/_mingw.h (__MINGW_GNUC_PREREQ): Define. Use to
guard __MINGW_ATTRIB macro definitions. * include/math.h (logb[fl]): Don't define inlines for GCC-4.0+ && __FAST_MATH__. (rint[fl], lrint[fl], llrint[fl]); Likewise. Clean up line-continuation backslashes.
Diffstat (limited to 'winsup/mingw/include/_mingw.h')
-rw-r--r--winsup/mingw/include/_mingw.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
index 4b3b42d6c..2d7a47cde 100644
--- a/winsup/mingw/include/_mingw.h
+++ b/winsup/mingw/include/_mingw.h
@@ -110,6 +110,14 @@
#define __CRT_INLINE extern __inline__
#endif
+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
+#define __MINGW_GNUC_PREREQ(major, minor) \
+ (__GNUC__ > (major) \
+ || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+#else
+#define __MINGW_GNUC_PREREQ(major, minor) 0
+#endif
+
#ifdef __cplusplus
# define __UNUSED_PARAM(x)
#else
@@ -128,7 +136,7 @@
#define __MINGW_ATTRIB_CONST
#endif
-#if ( __GNUC__ >= 3)
+#if __MINGW_GNUC_PREREQ (3, 0)
#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
#else
@@ -139,7 +147,7 @@
/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
variadiac macro facility, because variadic macros cause syntax
errors with --traditional-cpp. */
-#if (__GNUC__ > 3 ||( __GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+#if __MINGW_GNUC_PREREQ (3, 3)
#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
#else
#define __MINGW_ATTRIB_NONNULL(arg)