summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h.in5
-rwxr-xr-xconfigure62
-rw-r--r--configure.in1
-rw-r--r--libpam/pam_handlers.c2
-rw-r--r--modules/pam_group/pam_group.c2
-rw-r--r--modules/pam_issue/pam_issue.c3
-rw-r--r--modules/pam_mkhomedir/pam_mkhomedir.c3
-rw-r--r--modules/pam_rootok/pam_rootok.c2
-rw-r--r--modules/pam_securetty/pam_securetty.c2
-rw-r--r--modules/pam_shells/pam_shells.c2
-rw-r--r--modules/pam_succeed_if/pam_succeed_if.c2
-rw-r--r--modules/pam_umask/pam_umask.c2
-rw-r--r--modules/pam_unix/support.c2
-rw-r--r--modules/pam_warn/pam_warn.c2
-rw-r--r--modules/pam_wheel/pam_wheel.c2
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 </dev/null >&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 <<EOF
-#line 9362 "configure"
+#line 9368 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9457,7 +9463,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9460 "configure"
+#line 9466 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11705,11 +11711,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:11708: $lt_compile\"" >&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 <<EOF
-#line 13139 "configure"
+#line 13145 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13234,7 +13240,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13237 "configure"
+#line 13243 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14119,11 +14125,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:14122: $lt_compile\"" >&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 <<EOF
-#line 18870 "configure"
+#line 18876 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18965,7 +18971,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18968 "configure"
+#line 18974 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/configure.in b/configure.in
index 3f636c12..6b2fff48 100644
--- a/configure.in
+++ b/configure.in
@@ -43,6 +43,7 @@ fi
dnl Checks for programs.
+AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c
index 3e861115..fd5e8760 100644
--- a/libpam/pam_handlers.c
+++ b/libpam/pam_handlers.c
@@ -8,8 +8,6 @@
*
*/
-#define _GNU_SOURCE /* for asprintf */
-
#include "pam_private.h"
#include <stdlib.h>
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 <morgan@linux.kernel.org>\n";
-#define _BSD_SOURCE
-
#include "config.h"
#include <sys/file.h>
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 <string.h>
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 @@
<morgan@parc.power.net> 1996
*/
-/* I want snprintf dammit */
-#define _GNU_SOURCE
-
#include "config.h"
#include <stdarg.h>
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 <morgan@linux.kernel.org> 1996/3/11
*/
-#define _GNU_SOURCE
+#include "config.h"
#include <stdio.h>
#include <unistd.h>
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 <stdio.h>
#include <stdlib.h>
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 <pwd.h>
#include <stdarg.h>
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 <sys/types.h>
#include <errno.h>
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 <pwd.h>
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 <stdlib.h>
#include <unistd.h>
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 <morgan@linux.kernel.org> 1996/3/11
*/
-#define _BSD_SOURCE
+#include "config.h"
#include <stdio.h>
#include <unistd.h>
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 <stdio.h>
#include <unistd.h>