From: Gregory P. Smith Date: Sun, 22 Jan 2012 02:21:56 +0000 (-0800) Subject: Improve the test for dirfd(). Some systems #define it rather than X-Git-Tag: v3.3.0a1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1577cf758b061b2b9ae7449b637e67eb05b6e803;p=thirdparty%2FPython%2Fcpython.git Improve the test for dirfd(). Some systems #define it rather than have it as a library function. --- 1577cf758b061b2b9ae7449b637e67eb05b6e803 diff --cc configure index 10ee46ca570b,5f00c1ecfafb..ebae8f5b5ca1 --- a/configure +++ b/configure @@@ -9396,27 -9410,19 +9396,27 @@@ $as_echo "MACHDEP_OBJS" >&6; # checks for library functions for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ - clock confstr ctermid dirfd execv faccessat fchmod fchmodat fchown fchownat \ - clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \ - gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ ++ clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \ + fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ + futimens futimes gai_strerror \ + getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \ - mremap nice pathconf pause plock poll pthread_init \ - putenv readlink realpath \ - select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \ - setgid \ - setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \ - sigaction siginterrupt sigrelse snprintf strftime strlcpy \ + if_nameindex \ + initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \ + memrchr mbrtowc mkdirat mkfifo \ + mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ + posix_fallocate posix_fadvise pread \ + pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \ + select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ + setgid sethostname \ + setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \ + sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \ + sched_rr_get_interval \ + sigaction sigaltstack siginterrupt sigpending sigrelse \ + sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ - truncate uname unsetenv utimes waitpid wait3 wait4 \ - wcscoll wcsftime wcsxfrm _getpty + truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ + wcscoll wcsftime wcsxfrm writev _getpty do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --cc configure.in index 0aa094a80f3f,138d562011a2..f0beb6bbcc5f --- a/configure.in +++ b/configure.in @@@ -2562,28 -2587,26 +2562,34 @@@ AC_MSG_RESULT(MACHDEP_OBJS # checks for library functions AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ - clock confstr ctermid dirfd execv faccessat fchmod fchmodat fchown fchownat \ - clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \ - gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ ++ clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \ + fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ + futimens futimes gai_strerror \ + getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \ - mremap nice pathconf pause plock poll pthread_init \ - putenv readlink realpath \ - select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \ - setgid \ - setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \ - sigaction siginterrupt sigrelse snprintf strftime strlcpy \ + if_nameindex \ + initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \ + memrchr mbrtowc mkdirat mkfifo \ + mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ + posix_fallocate posix_fadvise pread \ + pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \ + select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ + setgid sethostname \ + setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \ + sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \ + sched_rr_get_interval \ + sigaction sigaltstack siginterrupt sigpending sigrelse \ + sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ - truncate uname unsetenv utimes waitpid wait3 wait4 \ - wcscoll wcsftime wcsxfrm _getpty) + truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ + wcscoll wcsftime wcsxfrm writev _getpty) + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , + [#include + #include ]) + # For some functions, having a definition is not sufficient, since # we want to take their address. AC_MSG_CHECKING(for chroot)