]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Define _GNU_SOURCE before checking for structures
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 14:49:32 +0000 (16:49 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 14:49:32 +0000 (16:49 +0200)
On Linux, useful features that are industry standard are
"protected" by requiring -D_GNU_SOURCE.  Why would you want
your users to *use* the features of libc?

configure
configure.in

index 73e8732fdd2fba8dbd09c6058b0f9320eb4b1537..1d316893ca7296ad465663c3e8448f73903473fb 100755 (executable)
--- a/configure
+++ b/configure
@@ -3824,6 +3824,10 @@ else
 fi
 
 
+if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
+fi
+
 # Check whether --enable-largefile was given.
 if test "${enable_largefile+set}" = set; then
   enableval=$enable_largefile;
@@ -25114,10 +25118,6 @@ else
 fi
 
 
-if test "x$GCC" = "xyes"; then
-    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
-fi
-
 { echo "$as_me:$LINENO: checking for developer gcc flags" >&5
 echo $ECHO_N "checking for developer gcc flags... $ECHO_C" >&6; }
 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
index a12eb9fb5182a25037fc4a38e189085bb3513d7a..d1d8e30bde9adc595bf8cc345d0c0445993c501d 100644 (file)
@@ -52,6 +52,13 @@ AC_PROG_GCC_TRADITIONAL
 AC_PROG_CC_SUNPRO
 AC_PROG_RANLIB
 
+dnl #
+dnl # Set Default CFLAGS
+dnl #
+if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
+fi
+
 dnl Compile in large (2G+) file support.
 AC_SYS_LARGEFILE
 
@@ -919,13 +926,6 @@ else
 fi
 AC_SUBST(LIBPREFIX)
 
-dnl #
-dnl # Set Default CFLAGS
-dnl #
-if test "x$GCC" = "xyes"; then
-    CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
-fi
-
 AC_MSG_CHECKING(for developer gcc flags)
 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"