mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Check whether we can take the address of chown, link, and symlink.
This commit is contained in:
parent
eb342298de
commit
c8ad7cc55e
3 changed files with 175 additions and 13 deletions
155
configure
vendored
155
configure
vendored
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Revision: 1.363 .
|
# From configure.in Revision: 1.364 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.53 for python 2.3.
|
# Generated by GNU Autoconf 2.53 for python 2.3.
|
||||||
#
|
#
|
||||||
|
@ -11964,18 +11964,15 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
|
||||||
|
|
||||||
|
|
||||||
for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
|
|
||||||
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
|
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
|
||||||
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
|
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
|
||||||
hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
|
hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
|
||||||
mremap nice pathconf pause plock poll pthread_init \
|
mremap nice pathconf pause plock poll pthread_init \
|
||||||
putenv readlink \
|
putenv readlink \
|
||||||
select setegid seteuid setgid setgroups \
|
select setegid seteuid setgid setgroups \
|
||||||
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
|
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
|
||||||
sigaction siginterrupt sigrelse strftime strptime symlink \
|
sigaction siginterrupt sigrelse strftime strptime \
|
||||||
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
|
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
|
||||||
truncate uname unsetenv utimes waitpid _getpty getpriority
|
truncate uname unsetenv utimes waitpid _getpty getpriority
|
||||||
do
|
do
|
||||||
|
@ -12053,6 +12050,150 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# For some functions, having a definition is not sufficient, since
|
||||||
|
# we want to take their address.
|
||||||
|
echo "$as_me:$LINENO: checking for chroot" >&5
|
||||||
|
echo $ECHO_N "checking for chroot... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#ifdef F77_DUMMY_MAIN
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
# endif
|
||||||
|
int F77_DUMMY_MAIN() { return 1; }
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
void *x=chroot
|
||||||
|
;
|
||||||
|
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_CHROOT 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 link" >&5
|
||||||
|
echo $ECHO_N "checking for link... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#ifdef F77_DUMMY_MAIN
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
# endif
|
||||||
|
int F77_DUMMY_MAIN() { return 1; }
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
void *x=link
|
||||||
|
;
|
||||||
|
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_LINK 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 symlink" >&5
|
||||||
|
echo $ECHO_N "checking for symlink... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
#ifdef F77_DUMMY_MAIN
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
# endif
|
||||||
|
int F77_DUMMY_MAIN() { return 1; }
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
void *x=symlink
|
||||||
|
;
|
||||||
|
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_SYMLINK 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
|
# check for openpty and forkpty
|
||||||
|
|
||||||
|
|
||||||
|
|
27
configure.in
27
configure.in
|
@ -1712,18 +1712,39 @@ fi
|
||||||
AC_MSG_RESULT(MACHDEP_OBJS)
|
AC_MSG_RESULT(MACHDEP_OBJS)
|
||||||
|
|
||||||
# checks for library functions
|
# checks for library functions
|
||||||
AC_CHECK_FUNCS(alarm chown chroot clock confstr ctermid ctermid_r execv \
|
AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r execv \
|
||||||
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
|
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
|
||||||
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
|
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
|
||||||
hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
|
hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
|
||||||
mremap nice pathconf pause plock poll pthread_init \
|
mremap nice pathconf pause plock poll pthread_init \
|
||||||
putenv readlink \
|
putenv readlink \
|
||||||
select setegid seteuid setgid setgroups \
|
select setegid seteuid setgid setgroups \
|
||||||
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
|
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
|
||||||
sigaction siginterrupt sigrelse strftime strptime symlink \
|
sigaction siginterrupt sigrelse strftime strptime \
|
||||||
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
|
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
|
||||||
truncate uname unsetenv utimes waitpid _getpty getpriority)
|
truncate uname unsetenv utimes waitpid _getpty getpriority)
|
||||||
|
|
||||||
|
# For some functions, having a definition is not sufficient, since
|
||||||
|
# we want to take their address.
|
||||||
|
AC_MSG_CHECKING(for chroot)
|
||||||
|
AC_TRY_COMPILE([#include <unistd.h>], void *x=chroot,
|
||||||
|
AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING(for link)
|
||||||
|
AC_TRY_COMPILE([#include <unistd.h>], void *x=link,
|
||||||
|
AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING(for symlink)
|
||||||
|
AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
|
||||||
|
AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
|
||||||
# check for openpty and forkpty
|
# check for openpty and forkpty
|
||||||
|
|
||||||
AC_CHECK_FUNCS(openpty,, AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"]))
|
AC_CHECK_FUNCS(openpty,, AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"]))
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
/* Define to 1 if you have the `chown' function. */
|
/* Define to 1 if you have the `chown' function. */
|
||||||
#undef HAVE_CHOWN
|
#undef HAVE_CHOWN
|
||||||
|
|
||||||
/* Define to 1 if you have the `chroot' function. */
|
/* Define if you have the 'chroot' function. */
|
||||||
#undef HAVE_CHROOT
|
#undef HAVE_CHROOT
|
||||||
|
|
||||||
/* Define to 1 if you have the `clock' function. */
|
/* Define to 1 if you have the `clock' function. */
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
/* Define to 1 if you have the <limits.h> header file. */
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
#undef HAVE_LIMITS_H
|
#undef HAVE_LIMITS_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `link' function. */
|
/* Define if you have the 'link' function. */
|
||||||
#undef HAVE_LINK
|
#undef HAVE_LINK
|
||||||
|
|
||||||
/* Define to 1 if you have the <locale.h> header file. */
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
|
@ -444,7 +444,7 @@
|
||||||
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
|
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
|
||||||
#undef HAVE_ST_BLOCKS
|
#undef HAVE_ST_BLOCKS
|
||||||
|
|
||||||
/* Define to 1 if you have the `symlink' function. */
|
/* Define if you have the 'symlink' function. */
|
||||||
#undef HAVE_SYMLINK
|
#undef HAVE_SYMLINK
|
||||||
|
|
||||||
/* Define to 1 if you have the `sysconf' function. */
|
/* Define to 1 if you have the `sysconf' function. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue