define the _XOPEN_SOURCE define in the config.h file instead, and also added a
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Aug 2004 07:25:08 +0000 (07:25 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Aug 2004 07:25:08 +0000 (07:25 +0000)
decent quote about the define, taken from
http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html

configure.ac

index 00633e2..9bd061a 100644 (file)
@@ -121,7 +121,17 @@ case $host in
   mips-sgi-irix*)
     if test "$GCC" != "yes"; then
       xopen="yes"
-      CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+
+      # "Applications should ensure that the feature test macro _XOPEN_SOURCE
+      # is defined with the value 500 before inclusion of any header. This is
+      # needed to enable the functionality described in this specification,
+      # and possibly to enable functionality defined elsewhere in the Common
+      # Applications Environment."
+
+      # So far, we've only detected this to be strictly necessary if not using
+      # gcc on SGI IRIX. And this only to avoid warnings.
+
+      AC_DEFINE(_XOPEN_SOURCE, 500, [ensure SUSV2 compatibility])
     fi
     ;;
   *)