]> granicus.if.org Git - sudo/commitdiff
Move _FOO_SOURCE to CPPFLAGS so it takes effect as early as possible.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 5 Feb 2005 14:57:44 +0000 (14:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 5 Feb 2005 14:57:44 +0000 (14:57 +0000)
Silences a warning about isblank() on linux.

config.h.in
configure
configure.in

index 2e0ef5c978ec9bba09f02e2593622f226ff57f40..5127192e5fadfd3cac4e4ecee6e82e4b8068e4bf 100644 (file)
 /* Define to avoid using the passwd/shadow file for authentication. */
 #undef WITHOUT_PASSWD
 
-/* Enable non-POSIX extensions on AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Enable non-POSIX extensions on ConvexOS. */
-#ifndef _CONVEX_SOURCE
-# undef _CONVEX_SOURCE
-#endif
-
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE   1
-#endif
-
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
index b1532964467b56ab5160612507f7ac273272e2b4..3abc50b2b31e4c2ca1e2c31ab461cd72da62d153 100755 (executable)
--- a/configure
+++ b/configure
@@ -20469,11 +20469,7 @@ done
                ;;
     *-*-aix*)
                # To get all prototypes (so we pass -Wall)
-               CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
-               cat >>confdefs.h <<\EOF
-#define _ALL_SOURCE 1
-EOF
-
+               CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE -D_ALL_SOURCE"
                SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
                if test X"$with_blibpath" != X"no"; then
                    echo "$as_me:$LINENO: checking if linker accepts -Wl,-blibpath" >&5
@@ -21913,6 +21909,7 @@ fi
                : ${mansectform='4'}
                ;;
     *-*-linux*)
+               CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
                # Some Linux versions need to link with -lshadow
                if test "$CHECKSHADOW" = "true"; then
 
@@ -22094,10 +22091,7 @@ done
                : ${with_pam='maybe'}
                ;;
     *-convex-bsd*)
-               cat >>confdefs.h <<\EOF
-#define _CONVEX_SOURCE 1
-EOF
-
+               CPPFLAGS="${CPPFLAGS} -D_CONVEX_SOURCE"
                if test -z "$GCC"; then
                    CFLAGS="${CFLAGS} -D__STDC__"
                fi
@@ -22855,6 +22849,9 @@ done
                : ${mansectsu='1m'}
                : ${mansectform='4'}
                ;;
+    *-gnu*)
+               CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
+               ;;
 esac
 
 : ${mansectsu='8'}
 
 
 
-
-
-
-
-
-
-
-
-
 
 
 
index bb856460ee0808b09c436ca87d11875aa2661c34..5a80e8fa384f21871752dbadca3cf734cedb99e1 100644 (file)
@@ -1262,8 +1262,7 @@ case "$host" in
                ;;
     *-*-aix*)
                # To get all prototypes (so we pass -Wall)
-               CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
-               SUDO_DEFINE(_ALL_SOURCE)
+               CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE -D_ALL_SOURCE"
                SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
                if test X"$with_blibpath" != X"no"; then
                    AC_MSG_CHECKING([if linker accepts -Wl,-blibpath])
@@ -1428,6 +1427,7 @@ case "$host" in
                : ${mansectform='4'}
                ;;
     *-*-linux*)
+               CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
                # Some Linux versions need to link with -lshadow
                if test "$CHECKSHADOW" = "true"; then
                    AC_CHECK_FUNCS(getspnam, , [AC_CHECK_LIB(shadow, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lshadow"; LIBS="${LIBS} -lshadow"])])
@@ -1436,7 +1436,7 @@ case "$host" in
                : ${with_pam='maybe'}
                ;;
     *-convex-bsd*)
-               SUDO_DEFINE(_CONVEX_SOURCE)
+               CPPFLAGS="${CPPFLAGS} -D_CONVEX_SOURCE"
                if test -z "$GCC"; then
                    CFLAGS="${CFLAGS} -D__STDC__"
                fi
@@ -1603,6 +1603,9 @@ case "$host" in
                : ${mansectsu='1m'}
                : ${mansectform='4'}
                ;;
+    *-gnu*)
+               CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
+               ;;
 esac
 
 dnl
@@ -2399,24 +2402,6 @@ AH_TEMPLATE(sig_atomic_t, [Define to `int' if <signal.h> does not define.])
 dnl
 dnl Bits to copy verbatim into config.h.in
 dnl
-AH_VERBATIM([_GNU_SOURCE],
-[/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE   1
-#endif])
-
-AH_VERBATIM([_ALL_SOURCE],
-[/* Enable non-POSIX extensions on AIX. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif])
-
-AH_VERBATIM([_CONVEX_SOURCE],
-[/* Enable non-POSIX extensions on ConvexOS. */
-#ifndef _CONVEX_SOURCE
-# undef _CONVEX_SOURCE
-#endif])
-
 AH_TOP([#ifndef _SUDO_CONFIG_H
 #define _SUDO_CONFIG_H])