summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-18 19:12:39 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-18 19:14:08 -0700
commit26573020d8618dc929cf27fa549f59298e3f70a2 (patch)
tree19e888d7c1ba06b07612b0c1b3bff2177a2f0150
parent8088815922a1c8fb185f4e4a7b57ddaf0f13f340 (diff)
downloadnasm-26573020d8618dc929cf27fa549f59298e3f70a2.tar.gz
Cleaner solution for MinGW handling of __STRICT_ANSI__
If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
-rw-r--r--compiler.h5
-rw-r--r--configure.in3
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler.h b/compiler.h
index e4e1b5b9..26fb1ccd 100644
--- a/compiler.h
+++ b/compiler.h
@@ -24,6 +24,11 @@
# include "config.h"
#endif
+/* __STRICT_ANSI__ buggers up MinGW, so disable it */
+#ifdef __MINGW32__
+# undef __STRICT_ANSI__
+#endif
+
/* This is required to get the standard <inttypes.h> macros when compiling
with a C++ compiler. This must be defined *before* <inttypes.h> is
included, directly or indirectly. */
diff --git a/configure.in b/configure.in
index 8cbde3ca..93759fd8 100644
--- a/configure.in
+++ b/configure.in
@@ -67,9 +67,6 @@ PA_ADD_CFLAGS([-W])
PA_ADD_CFLAGS([-Wall])
PA_ADD_CFLAGS([-std=c99])
PA_ADD_CFLAGS([-pedantic])
-dnl mingw disables a bunch of features if __STRICT_ANSI__ is defined,
-dnl and -std=c99 defines __STRICT_ANSI__
-PA_ADD_CFLAGS([-U__STRICT_ANSI__])
dnl Look for "nroff" or "groff"
AC_CHECK_PROGS(NROFF, nroff, echo)