OSDN Git Service

configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS.
authorDiego Biurrun <diego@biurrun.de>
Sun, 15 May 2011 12:32:15 +0000 (14:32 +0200)
committerDiego Biurrun <diego@biurrun.de>
Mon, 23 May 2011 20:51:14 +0000 (22:51 +0200)
In -std=c99 mode GCC defines __STRICT_ANSI__ to hide non-ANSI interfaces.
This causes declarations for some POSIX functions to be omitted from system
headers, which causes compilation failures.

configure

index b63330c..5e3d6fb 100755 (executable)
--- a/configure
+++ b/configure
@@ -2458,11 +2458,13 @@ case $target_os in
         objformat="win32"
         enable dos_paths
         check_cflags -fno-common
+        add_cppflags -U__STRICT_ANSI__
         ;;
     *-dos|freedos|opendos)
         network_extralibs="-lsocket"
         objformat="coff"
         enable dos_paths
+        add_cppflags -U__STRICT_ANSI__
         ;;
     linux)
         add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600