Move _FOO_SOURCE to CPPFLAGS so it takes effect as early as possible.
Silences a warning about isblank() on linux.
This commit is contained in:
15
config.h.in
15
config.h.in
@@ -537,21 +537,6 @@
|
||||
/* 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
|
||||
|
||||
|
24
configure
vendored
24
configure
vendored
@@ -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'}
|
||||
@@ -33824,15 +33821,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
27
configure.in
27
configure.in
@@ -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])
|
||||
|
||||
|
Reference in New Issue
Block a user