summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-11-21 20:41:28 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-11-21 20:41:28 (GMT)
commitd584368dec1fd74e7bc1a72dec2d50172aa1278e (patch)
tree1b122009d6a9839d002bbd41bec5d86a70883905 /configure
parentfec326269163f2c27e8bb89bea264495fe337918 (diff)
downloadcpython-d584368dec1fd74e7bc1a72dec2d50172aa1278e.zip
cpython-d584368dec1fd74e7bc1a72dec2d50172aa1278e.tar.gz
cpython-d584368dec1fd74e7bc1a72dec2d50172aa1278e.tar.bz2
Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
prototypes explicitly.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure120
1 files changed, 111 insertions, 9 deletions
diff --git a/configure b/configure
index f6a8cce..c07fae9 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.369 .
+# From configure.in Revision: 1.370 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
@@ -1341,10 +1341,6 @@ case $ac_sys_system/$ac_sys_release in
# even though select is a POSIX function. Reported by J. Ribbens.
OpenBSD/2.* | OpenBSD/3.[012])
define_xopen_source=no;;
- # On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE
- # is define. Reported by M. Recht.
- FreeBSD/5.0*)
- define_xopen_source=no;;
esac
if test $define_xopen_source = yes
@@ -11988,15 +11984,13 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
-
-
-for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
+for ac_func in alarm chown clock confstr ctermid execv \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink \
- select setegid seteuid setgid setgroups \
+ select setegid seteuid setgid \
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
sigaction siginterrupt sigrelse strftime strptime \
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
@@ -12220,6 +12214,114 @@ echo "${ECHO_T}no" >&6
fi
rm -f conftest.$ac_objext conftest.$ac_ext
+# On some systems (eg. FreeBSD 5), we would find a definition of the
+# functions ctermid_r, setgroups in the library, but no prototype
+# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
+# address to avoid compiler warnings and potential miscompilations
+# because of the missing prototypes.
+
+echo "$as_me:$LINENO: checking for ctermid_r" >&5
+echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include "confdefs.h"
+#include <stdio.h>
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+void* p = ctermid_r
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTERMID_R 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for setgroups" >&5
+echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include "confdefs.h"
+#include <unistd.h.h>
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+void* p = setgroups
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETGROUPS 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
# check for openpty and forkpty