Cleaner solution for MinGW handling of __STRICT_ANSI__

If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
This commit is contained in:
H. Peter Anvin 2007-10-18 19:12:39 -07:00
parent 8088815922
commit 26573020d8
2 changed files with 5 additions and 3 deletions

View file

@ -24,6 +24,11 @@
# include "config.h" # include "config.h"
#endif #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 /* This is required to get the standard <inttypes.h> macros when compiling
with a C++ compiler. This must be defined *before* <inttypes.h> is with a C++ compiler. This must be defined *before* <inttypes.h> is
included, directly or indirectly. */ included, directly or indirectly. */

View file

@ -67,9 +67,6 @@ PA_ADD_CFLAGS([-W])
PA_ADD_CFLAGS([-Wall]) PA_ADD_CFLAGS([-Wall])
PA_ADD_CFLAGS([-std=c99]) PA_ADD_CFLAGS([-std=c99])
PA_ADD_CFLAGS([-pedantic]) 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" dnl Look for "nroff" or "groff"
AC_CHECK_PROGS(NROFF, nroff, echo) AC_CHECK_PROGS(NROFF, nroff, echo)