From 9c2fe904ad9a703f1ea71436e26aa1643f8337d3 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 18 Aug 2005 11:30:05 +0000 Subject: Relevant BUGIDs: none Purpose of commit: bugfix Commit summary: --------------- configure should set _GNU_SOURCE/_BSD_SOURCE --- config.h.in | 5 +++ configure | 62 ++++++++++++++++++--------------- configure.in | 1 + libpam/pam_handlers.c | 2 -- modules/pam_group/pam_group.c | 2 -- modules/pam_issue/pam_issue.c | 3 -- modules/pam_mkhomedir/pam_mkhomedir.c | 3 -- modules/pam_rootok/pam_rootok.c | 2 +- modules/pam_securetty/pam_securetty.c | 2 +- modules/pam_shells/pam_shells.c | 2 +- modules/pam_succeed_if/pam_succeed_if.c | 2 +- modules/pam_umask/pam_umask.c | 2 -- modules/pam_unix/support.c | 2 +- modules/pam_warn/pam_warn.c | 2 +- modules/pam_wheel/pam_wheel.c | 2 +- 15 files changed, 47 insertions(+), 47 deletions(-) diff --git a/config.h.in b/config.h.in index 0e3c0e40..5094d463 100644 --- a/config.h.in +++ b/config.h.in @@ -234,6 +234,11 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES diff --git a/configure b/configure index 4776f8cc..b4210897 100755 --- a/configure +++ b/configure @@ -2034,6 +2034,12 @@ then fi + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4118,7 +4124,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4121 "configure"' > conftest.$ac_ext + echo '#line 4127 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5697,7 +5703,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5700:" \ +echo "$as_me:5706:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6795,11 +6801,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6798: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6804: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6802: \$? = $ac_status" >&5 + echo "$as_me:6808: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7057,11 +7063,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7060: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7066: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7064: \$? = $ac_status" >&5 + echo "$as_me:7070: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7119,11 +7125,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7122: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7128: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7126: \$? = $ac_status" >&5 + echo "$as_me:7132: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9359,7 +9365,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11714: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11712: \$? = $ac_status" >&5 + echo "$as_me:11718: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11767,11 +11773,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11770: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11776: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11774: \$? = $ac_status" >&5 + echo "$as_me:11780: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13136,7 +13142,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:14128: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14126: \$? = $ac_status" >&5 + echo "$as_me:14132: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14181,11 +14187,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14184: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14190: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14188: \$? = $ac_status" >&5 + echo "$as_me:14194: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16303,11 +16309,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16306: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16312: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16310: \$? = $ac_status" >&5 + echo "$as_me:16316: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16565,11 +16571,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16568: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16574: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16572: \$? = $ac_status" >&5 + echo "$as_me:16578: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16627,11 +16633,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16630: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16636: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16634: \$? = $ac_status" >&5 + echo "$as_me:16640: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18867,7 +18873,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index 81fa64de..d8d6d43e 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -11,8 +11,6 @@ static const char rcsid[] = "Version 0.5 for Linux-PAM\n" "Copyright (c) Andrew G. Morgan 1996 \n"; -#define _BSD_SOURCE - #include "config.h" #include diff --git a/modules/pam_issue/pam_issue.c b/modules/pam_issue/pam_issue.c index 27c10e60..0ff5e646 100644 --- a/modules/pam_issue/pam_issue.c +++ b/modules/pam_issue/pam_issue.c @@ -14,9 +14,6 @@ * Released under the GNU LGPL version 2 or later */ -#define _GNU_SOURCE -#define _BSD_SOURCE - #include "config.h" #include diff --git a/modules/pam_mkhomedir/pam_mkhomedir.c b/modules/pam_mkhomedir/pam_mkhomedir.c index f842cd7f..95bd72fd 100644 --- a/modules/pam_mkhomedir/pam_mkhomedir.c +++ b/modules/pam_mkhomedir/pam_mkhomedir.c @@ -27,9 +27,6 @@ 1996 */ -/* I want snprintf dammit */ -#define _GNU_SOURCE - #include "config.h" #include diff --git a/modules/pam_rootok/pam_rootok.c b/modules/pam_rootok/pam_rootok.c index 93e31691..77541f8a 100644 --- a/modules/pam_rootok/pam_rootok.c +++ b/modules/pam_rootok/pam_rootok.c @@ -6,7 +6,7 @@ * Written by Andrew Morgan 1996/3/11 */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c index c45ef351..8a956880 100644 --- a/modules/pam_securetty/pam_securetty.c +++ b/modules/pam_securetty/pam_securetty.c @@ -10,7 +10,7 @@ * Slight modifications AGM. 1996/12/3 */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c index 64359eac..6937b439 100644 --- a/modules/pam_shells/pam_shells.c +++ b/modules/pam_shells/pam_shells.c @@ -8,7 +8,7 @@ * This code shamelessly ripped from the pam_securetty module. */ -#define _BSD_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c index 65ccaa3a..935c47a0 100644 --- a/modules/pam_succeed_if/pam_succeed_if.c +++ b/modules/pam_succeed_if/pam_succeed_if.c @@ -37,7 +37,7 @@ * */ -#define _GNU_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c index e13f55ad..6731278c 100644 --- a/modules/pam_umask/pam_umask.c +++ b/modules/pam_umask/pam_umask.c @@ -33,8 +33,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define _GNU_SOURCE - #include "config.h" #include diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index bb75298c..fc7fc2b3 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -4,7 +4,7 @@ * Copyright information at end of file. */ -#define _BSD_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_warn/pam_warn.c b/modules/pam_warn/pam_warn.c index ee787e73..65e591a7 100644 --- a/modules/pam_warn/pam_warn.c +++ b/modules/pam_warn/pam_warn.c @@ -6,7 +6,7 @@ * Written by Andrew Morgan 1996/3/11 */ -#define _BSD_SOURCE +#include "config.h" #include #include diff --git a/modules/pam_wheel/pam_wheel.c b/modules/pam_wheel/pam_wheel.c index 92cd44b9..d91a864e 100644 --- a/modules/pam_wheel/pam_wheel.c +++ b/modules/pam_wheel/pam_wheel.c @@ -21,7 +21,7 @@ * a wheel member. */ -#define _BSD_SOURCE +#include "config.h" #include #include -- cgit v1.2.3