# $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
d_dbl_dig=''
d_dbminitproto=''
d_difftime=''
+d_dirfd=''
d_dlerror=''
d_dlopen=''
d_dlsymun=''
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
*) 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
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'
*/
#$d_dbminitproto HAS_DBMINIT_PROTO /**/
+/* HAS_DIRFD:
+ * This manifest constant lets the C program know that dirfd
+ * is available.
+ */
+#$d_dirfd HAS_DIRFD /**/
+
/* HAS_FLOCK_PROTO:
* This symbol, if defined, indicates that the system provides
* a prototype for the flock() function. Otherwise, it is up
#define PERL_GPROF_MONCONTROL(x)
#endif
+#ifdef UNDER_CE
+#include "wince.h"
+#endif
+
+/* ISO 6429 NEL - C1 control NExt Line */
+/* See http://www.unicode.org/unicode/reports/tr13/ */
+#ifdef EBCDIC /* In EBCDIC NEL is just an alias for LF */
+# if '^' == 95 /* CP 1047: MVS OpenEdition - OS/390 - z/OS */
+# define NEXT_LINE_CHAR 0x15
+# else /* CDRA */
+# define NEXT_LINE_CHAR 0x25
+# endif
+#else
+# define NEXT_LINE_CHAR 0x85
+#endif
+
+/* The UTF-8 bytes of the Unicode LS and PS, U+2028 and U+2029 */
+#define UNICODE_LINE_SEPA_0 0xE2
+#define UNICODE_LINE_SEPA_1 0x80
+#define UNICODE_LINE_SEPA_2 0xA8
+#define UNICODE_PARA_SEPA_0 0xE2
+#define UNICODE_PARA_SEPA_1 0x80
+#define UNICODE_PARA_SEPA_2 0xA9
+
/* and finally... */
#define PERL_PATCHLEVEL_H_IMPLICIT
#include "patchlevel.h"
HAS_STRUCT_CMSGHDR
HAS_NL_LANGINFO
+
+ HAS_DIRFD
so that Configure picks them up. */
-#ifdef UNDER_CE
-#include "wince.h"
-#endif
-
-/* ISO 6429 NEL - C1 control NExt Line */
-/* See http://www.unicode.org/unicode/reports/tr13/ */
-#ifdef EBCDIC /* In EBCDIC NEL is just an alias for LF */
-# if '^' == 95 /* CP 1047: MVS OpenEdition - OS/390 - z/OS */
-# define NEXT_LINE_CHAR 0x15
-# else /* CDRA */
-# define NEXT_LINE_CHAR 0x25
-# endif
-#else
-# define NEXT_LINE_CHAR 0x85
-#endif
-
-/* The UTF-8 bytes of the Unicode LS and PS, U+2028 and U+2029 */
-#define UNICODE_LINE_SEPA_0 0xE2
-#define UNICODE_LINE_SEPA_1 0x80
-#define UNICODE_LINE_SEPA_2 0xA8
-#define UNICODE_PARA_SEPA_0 0xE2
-#define UNICODE_PARA_SEPA_1 0x80
-#define UNICODE_PARA_SEPA_2 0xA9
-
#endif /* Include guard */
+