summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-01-22 02:20:15 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-01-22 02:20:15 (GMT)
commitdf300d5062aa928260e50832e0788ca6da10c0be (patch)
tree6a7b0c05b8dbae36753ebcaa3c7cef3c6a10cc41 /configure.in
parente9b7cab1da131f26e0a04900718a39da962b82e1 (diff)
downloadcpython-df300d5062aa928260e50832e0788ca6da10c0be.zip
cpython-df300d5062aa928260e50832e0788ca6da10c0be.tar.gz
cpython-df300d5062aa928260e50832e0788ca6da10c0be.tar.bz2
Improve the test for dirfd(), some systems #define it rather than have
an actual 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 71e0a8f..138d562 100644
--- a/configure.in
+++ b/configure.in
@@ -2587,7 +2587,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 fchmod fchown fork fpathconf ftime ftruncate \
+ clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
@@ -2601,6 +2601,12 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
truncate uname unsetenv utimes waitpid wait3 wait4 \
wcscoll wcsftime wcsxfrm _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)