summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-01-22 02:21:56 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-01-22 02:21:56 (GMT)
commit1577cf758b061b2b9ae7449b637e67eb05b6e803 (patch)
tree5e6cfe8472053cf1ac463d6eebf3c634a7596df3 /configure.in
parentd45382db0b1fd6ad89cc43cd87c181f2289a403e (diff)
parentdf300d5062aa928260e50832e0788ca6da10c0be (diff)
downloadcpython-1577cf758b061b2b9ae7449b637e67eb05b6e803.zip
cpython-1577cf758b061b2b9ae7449b637e67eb05b6e803.tar.gz
cpython-1577cf758b061b2b9ae7449b637e67eb05b6e803.tar.bz2
Improve the test for dirfd(). Some systems #define it rather than
have it as a library function.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 0aa094a..f0beb6b 100644
--- a/configure.in
+++ b/configure.in
@@ -2562,7 +2562,7 @@ 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 faccessat fchmod fchmodat fchown fchownat \
fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
futimens futimes gai_strerror \
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
@@ -2584,6 +2584,12 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
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 <sys/types.h>
+ #include <dirent.h>])
+
# For some functions, having a definition is not sufficient, since
# we want to take their address.
AC_MSG_CHECKING(for chroot)