summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-23 18:09:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-23 18:09:37 +0000
commitae0e3d3b35cf70354d3fdbc894ffe3064a567667 (patch)
treea47416a946612d985678972cdc902e94b52f4ead /Configure
parent165444cdf3b3a33edaf56f31103ddaa68085c6b2 (diff)
downloadperl-ae0e3d3b35cf70354d3fdbc894ffe3064a567667.tar.gz
Add probing for dirfd() so that it can be added it IO::Dir.
p4raw-id: //depot/perl@13211
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure69
1 files changed, 60 insertions, 9 deletions
diff --git a/Configure b/Configure
index 0b1b043c04..87ba29cd01 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Nov 22 08:04:01 EET 2001 [metaconfig 3.0 PL70]
+# Generated on Fri Nov 23 21:08:41 EET 2001 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -345,6 +345,7 @@ d_cuserid=''
d_dbl_dig=''
d_dbminitproto=''
d_difftime=''
+d_dirfd=''
d_dlerror=''
d_dlopen=''
d_dlsymun=''
@@ -9517,6 +9518,63 @@ set d_dirnamlen
eval $setvar
$rm -f try.c
+: see if this is an sysdir system
+set sys/dir.h i_sysdir
+eval $inhdr
+
+: see if this is an sysndir system
+set sys/ndir.h i_sysndir
+eval $inhdr
+
+: Look for dirfd
+echo " "
+$cat >dirfd.c <<EOM
+#include <stdio.h>
+#$i_dirent I_DIRENT /**/
+#$i_sysdir I_SYS_DIR /**/
+#$i_sysndir I_SYS_NDIR /**/
+#$i_systypes I_SYS_TYPES /**/
+#if defined(I_SYS_TYPES)
+#include <sys/types.h>
+#endif
+#if defined(I_DIRENT)
+#include <dirent.h>
+#if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
+#include <sys/dir.h>
+#endif
+#else
+#ifdef I_SYS_NDIR
+#include <sys/ndir.h>
+#else
+#ifdef I_SYS_DIR
+#ifdef hp9000s500
+#include <ndir.h> /* may be wrong in the future */
+#else
+#include <sys/dir.h>
+#endif
+#endif
+#endif
+#endif
+int main() {
+ DIR *dirp = opendir(".");
+ if (dirfd(dirp) >= 0)
+ exit(0);
+ else
+ exit(1);
+}
+EOM
+set dirfd
+if eval $compile; then
+ val="$define"
+fi
+case "$val" in
+$define) echo "dirfd() found." >&4 ;;
+*) echo "dirfd() NOT found." >&4 ;;
+esac
+set d_dirfd
+eval $setvar
+$rm -f dirfd*
+
: see if dlerror exists
xxx_runnm="$runnm"
runnm=false
@@ -13443,14 +13501,6 @@ $define) usevfork='true';;
*) usevfork='false';;
esac
-: see if this is an sysdir system
-set sys/dir.h i_sysdir
-eval $inhdr
-
-: see if this is an sysndir system
-set sys/ndir.h i_sysndir
-eval $inhdr
-
: see if closedir exists
set closedir d_closedir
eval $inlibc
@@ -16832,6 +16882,7 @@ d_cuserid='$d_cuserid'
d_dbl_dig='$d_dbl_dig'
d_dbminitproto='$d_dbminitproto'
d_difftime='$d_difftime'
+d_dirfd='$d_dirfd'
d_dirnamlen='$d_dirnamlen'
d_dlerror='$d_dlerror'
d_dlopen='$d_dlopen'