summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-25 08:28:57 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-25 08:28:57 +0000
commit9423c6fcd41d6bc971cab01e8cdfbf515a9aaaea (patch)
tree16f263e03a5819380adcd3555d14855fbf85e32e
parent7c2ea1c74a297a6e4f5e99f73e5cadca30825f36 (diff)
downloadperl-9423c6fcd41d6bc971cab01e8cdfbf515a9aaaea.tar.gz
assorted tweaks
p4raw-id: //depot/perl@3472
-rw-r--r--doio.c8
-rw-r--r--iperlsys.h4
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/config_H.bc221
-rw-r--r--win32/config_H.gc221
-rw-r--r--win32/config_H.vc221
-rw-r--r--win32/makedef.pl2
9 files changed, 455 insertions, 228 deletions
diff --git a/doio.c b/doio.c
index 52acbde0c3..7456cefa48 100644
--- a/doio.c
+++ b/doio.c
@@ -1004,11 +1004,7 @@ my_lstat(ARGSproto)
sv = POPs;
PUTBACK;
sv_setpv(PL_statname,SvPV(sv, n_a));
-#ifdef HAS_LSTAT
PL_laststatval = PerlLIO_lstat(SvPV(sv, n_a),&PL_statcache);
-#else
- PL_laststatval = PerlLIO_stat(SvPV(sv, n_a),&PL_statcache);
-#endif
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(SvPV(sv, n_a), '\n'))
warner(WARN_NEWLINE, PL_warn_nl, "lstat");
return PL_laststatval;
@@ -1317,11 +1313,7 @@ nothing in the core.
tot--;
}
else { /* don't let root wipe out directories without -U */
-#ifdef HAS_LSTAT
if (PerlLIO_lstat(s,&PL_statbuf) < 0 || S_ISDIR(PL_statbuf.st_mode))
-#else
- if (PerlLIO_stat(s,&PL_statbuf) < 0 || S_ISDIR(PL_statbuf.st_mode))
-#endif
tot--;
else {
if (UNLINK(s))
diff --git a/iperlsys.h b/iperlsys.h
index 5f0ed0c92a..1c376ef0cd 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -597,7 +597,11 @@ public:
#define PerlLIO_ioctl(fd, u, buf) ioctl((fd), (u), (buf))
#define PerlLIO_isatty(fd) isatty((fd))
#define PerlLIO_lseek(fd, offset, mode) lseek((fd), (offset), (mode))
+#ifdef HAS_LSTAT
#define PerlLIO_lstat(name, buf) lstat((name), (buf))
+#else
+#define PerlLIO_lstat(name, buf) PerlLIO_stat((name), (buf))
+#endif
#define PerlLIO_mktemp(file) mktemp((file))
#define PerlLIO_mkstemp(file) mkstemp((file))
#define PerlLIO_open(file, flag) open((file), (flag))
diff --git a/win32/config.bc b/win32/config.bc
index 6936dcc98f..515501543c 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -372,6 +372,8 @@ eunicefix=':'
exe_ext='.exe'
expr='expr'
extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
+fflushNULL='define'
+fflushall='undef'
find='find'
firstmakefile='makefile'
flex=''
diff --git a/win32/config.gc b/win32/config.gc
index 200b10c33c..7d65b56612 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -372,6 +372,8 @@ eunicefix=':'
exe_ext='.exe'
expr='expr'
extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
+fflushNULL='define'
+fflushall='undef'
find='find'
firstmakefile='makefile'
flex=''
diff --git a/win32/config.vc b/win32/config.vc
index 09fa5af202..1b44425797 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -372,6 +372,8 @@ eunicefix=':'
exe_ext='.exe'
expr='expr'
extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
+fflushNULL='define'
+fflushall='undef'
find='find'
firstmakefile='makefile'
flex=''
diff --git a/win32/config_H.bc b/win32/config_H.bc
index 9a87054207..a1aef0be4d 100644
--- a/win32/config_H.bc
+++ b/win32/config_H.bc
@@ -224,27 +224,6 @@
*/
/*#define HAS_GETGROUPS /**/
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name. See also HAS_GETHOSTNAME and HAS_UNAME.
- * Note that the command uses a fully qualified path, so that it is safe
- * even if used by a process with super-user privileges.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define PHOSTNAME "" / * How to get the host name */
-
/* HAS_GETLOGIN:
* This symbol, if defined, indicates that the getlogin routine is
* available to get the login name.
@@ -708,11 +687,6 @@
*/
#define HAS_UMASK /**/
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK /**/
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1053,20 +1027,54 @@
*/
/*#define I_SYS_SECURITY /**/
+/* CROSSCOMPILE:
+ * This symbol, if defined, signifies that we our
+ * build process is a cross-compilation.
+ */
+/*#define CROSSCOMPILE /**/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* MULTIARCH:
+ * This symbol, if defined, signifies that the build
+ * process will produce some binary files that are going to be
+ * used in a cross-platform environment. This is the case for
+ * example with the NeXT "fat" binaries that contain executables
+ * for several CPUs.
+ */
+/*#define MULTIARCH /**/
+
/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8. The default is eight,
+ * for safety.
*/
-#define MEM_ALIGNBYTES 8 /**/
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# define MEM_ALIGNBYTES 8
+#else
+#define MEM_ALIGNBYTES 8
+#endif
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
* i.e. 0x1234 or 0x4321, etc...
+ * If the compiler supports cross-compiling or multiple-architecture
+ * binaries (eg. on NeXT systems), use compiler-defined macros to
+ * determine the byte order.
* On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
* Binaries (MAB) on either big endian or little endian machines.
* The endian-ness is available at compile-time. This only matters
@@ -1077,14 +1085,31 @@
* so the default case (for NeXT) is big endian to catch them.
* This might matter for NeXT 3.0.
*/
-#ifndef NeXT
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# ifdef __LITTLE_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x1234
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x12345678
+# endif
+# endif
+# else
+# ifdef __BIG_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x4321
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x87654321
+# endif
+# endif
+# endif
+# endif
+# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
+# define BYTEORDER 0x4321
+# endif
+#else
#define BYTEORDER 0x1234 /* large digits for MSB */
-#else /* NeXT */
-#ifdef __LITTLE_ENDIAN__
-#define BYTEORDER 0x1234
-#else /* __BIG_ENDIAN__ */
-#define BYTEORDER 0x4321
-#endif /* ENDIAN CHECK */
#endif /* NeXT */
/* CASTI32:
@@ -1316,22 +1341,6 @@
/*#define I_SYS_TIME /**/
/*#define I_SYS_TIME_KERNEL /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* VAL_O_NONBLOCK:
* This symbol is to be used during open() or fcntl(F_SETFL) to turn on
* non-blocking I/O for the file descriptor. Note that there is no way
@@ -1538,6 +1547,30 @@
*/
/*#define HAS_GETHOSTENT /**/
+/* HAS_GETHOSTNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * gethostname() routine to derive the host name. See also HAS_UNAME
+ * and PHOSTNAME.
+ */
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+/* PHOSTNAME:
+ * This symbol, if defined, indicates the command to feed to the
+ * popen() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and HAS_UNAME. Note that the command uses a fully qualified path,
+ * so that it is safe even if used by a process with super-user
+ * privileges.
+ */
+#define HAS_GETHOSTNAME /**/
+#define HAS_UNAME /**/
+#undef HAS_PHOSTNAME
+#ifdef HAS_PHOSTNAME
+#define PHOSTNAME "" /* How to get the host name */
+#endif
+
/* HAS_GETNETBYADDR:
* This symbol, if defined, indicates that the getnetbyaddr() routine is
* available to look up networks by their IP addresses.
@@ -1649,6 +1682,12 @@
#define LONGLONGSIZE 8 /**/
#endif
+/* HAS_MEMCHR:
+ * This symbol, if defined, indicates that the memchr routine is available
+ * to locate characters within a C string.
+ */
+/*#define HAS_MEMCHR /**/
+
/* HAS_MMAP:
* This symbol, if defined, indicates that the mmap system call is
* available to map a file into memory.
@@ -1847,6 +1886,11 @@
/*#define USE_SEMCTL_SEMUN /**/
/*#define USE_SEMCTL_SEMID_DS /**/
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK /**/
+
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
@@ -2044,6 +2088,18 @@
*/
/*#define HAS_FTELLO /**/
+/* HAS_GETMNTENT:
+ * This symbol, if defined, indicates that the getmntent routine is
+ * available to iterate through mounted file systems.
+ */
+/*#define HAS_GETMNTENT /**/
+
+/* HAS_HASMNTOPT:
+ * This symbol, if defined, indicates that the hasmntopt routine is
+ * available to query the mount options of file systems.
+ */
+/*#define HAS_HASMNTOPT /**/
+
/* HAS_MADVISE:
* This symbol, if defined, indicates that the madvise system call is
* available to map a file into memory.
@@ -2056,18 +2112,6 @@
*/
/*#define HAS_MPROTECT /**/
-/* MULTIARCH:
- * This symbol, if defined, indicates that we have a multiarchitecture
- * build.
- */
-/*#define MULTIARCH /**/
-
-/* CROSSCOMPILE:
- * This symbol, if defined, indicates that we have a cross-compile
- * build.
- */
-/*#define MULTIARCH /**/
-
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
* available to do gather reads. You will also need <sys/uio.h>
@@ -2083,21 +2127,21 @@
/* HAS_FSTATFS:
* This symbol, if defined, indicates that the fstatfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/* HAS_STRUCT_STATFS_FLAGS:
* This symbol, if defined, indicates that the struct statfs
* does have the f_flags member containing the mount flags of
* the filesystem holding the file.
- * This kind of struct statfs is coming from sys/mount.h (BSD)
- * and not from sys/statfs.h (SYSV).
+ * This kind of struct statfs is coming from sys/mount.h (BSD),
+ * not from sys/statfs.h (SYSV).
*/
/*#define HAS_FSTATFS /**/
/*#define HAS_STRUCT_STATFS_FLAGS /**/
/* HAS_FSTATVFS:
* This symbol, if defined, indicates that the fstatvfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/*#define HAS_FSTATVFS /**/
@@ -2157,6 +2201,20 @@
*/
#define USE_DYNAMIC_LOADING /**/
+/* FFLUSH_NULL:
+ * This symbol, if defined, tells that fflush(NULL) does flush
+ * all pending stdio output.
+ */
+/* FFLUSH_ALL:
+ * This symbol, if defined, tells that to flush
+ * all pending stdio output one must loop through all
+ * the stdio file handles stored in an array and fflush them.
+ * Note that if fflushNULL is defined, fflushall will not
+ * even be probed for and will be left undefined.
+ */
+#define FFLUSH_NULL /**/
+/*#define FFLUSH_ALL /**/
+
/* DB_Prefix_t:
* This symbol contains the type of the prefix structure element
* in the <db.h> header file. In older versions of DB, it was
@@ -2188,6 +2246,12 @@
*/
/*#define I_MNTENT /**/
+/* I_NETINET_TCP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/tcp.h>.
+ */
+/*#define I_NETINET_TCP /**/
+
/* I_POLL:
* This symbol, if defined, indicates that <poll.h> exists and
* should be included.
@@ -2389,6 +2453,17 @@
/*#define HAS_FTELLO64 /**/
/*#define HAS_TMPFILE64 /**/
+/* HAS_STDIO_STREAM_ARRAY:
+ * This symbol, if defined, tells that there is an array
+ * holding the stdio streams.
+ */
+/* STDIO_STREAM_ARRAY:
+ * This symbol tells the name of the array holding the stdio streams.
+ * Usual values include _iob, __iob, and __sF.
+ */
+/*#define HAS_STDIO_STREAM_ARRAY /**/
+#define STDIO_STREAM_ARRAY undef
+
/* USE_64_BITS:
* This symbol, if defined, indicates that 64-bit interfaces should
* be used when available. If not defined, the native default interfaces
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 271a6f51ff..c44b92d3f1 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -224,27 +224,6 @@
*/
/*#define HAS_GETGROUPS /**/
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name. See also HAS_GETHOSTNAME and HAS_UNAME.
- * Note that the command uses a fully qualified path, so that it is safe
- * even if used by a process with super-user privileges.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define PHOSTNAME "" / * How to get the host name */
-
/* HAS_GETLOGIN:
* This symbol, if defined, indicates that the getlogin routine is
* available to get the login name.
@@ -708,11 +687,6 @@
*/
#define HAS_UMASK /**/
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK /**/
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1053,20 +1027,54 @@
*/
/*#define I_SYS_SECURITY /**/
+/* CROSSCOMPILE:
+ * This symbol, if defined, signifies that we our
+ * build process is a cross-compilation.
+ */
+/*#define CROSSCOMPILE /**/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* MULTIARCH:
+ * This symbol, if defined, signifies that the build
+ * process will produce some binary files that are going to be
+ * used in a cross-platform environment. This is the case for
+ * example with the NeXT "fat" binaries that contain executables
+ * for several CPUs.
+ */
+/*#define MULTIARCH /**/
+
/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8. The default is eight,
+ * for safety.
*/
-#define MEM_ALIGNBYTES 8 /**/
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# define MEM_ALIGNBYTES 8
+#else
+#define MEM_ALIGNBYTES 8
+#endif
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
* i.e. 0x1234 or 0x4321, etc...
+ * If the compiler supports cross-compiling or multiple-architecture
+ * binaries (eg. on NeXT systems), use compiler-defined macros to
+ * determine the byte order.
* On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
* Binaries (MAB) on either big endian or little endian machines.
* The endian-ness is available at compile-time. This only matters
@@ -1077,14 +1085,31 @@
* so the default case (for NeXT) is big endian to catch them.
* This might matter for NeXT 3.0.
*/
-#ifndef NeXT
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# ifdef __LITTLE_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x1234
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x12345678
+# endif
+# endif
+# else
+# ifdef __BIG_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x4321
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x87654321
+# endif
+# endif
+# endif
+# endif
+# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
+# define BYTEORDER 0x4321
+# endif
+#else
#define BYTEORDER 0x1234 /* large digits for MSB */
-#else /* NeXT */
-#ifdef __LITTLE_ENDIAN__
-#define BYTEORDER 0x1234
-#else /* __BIG_ENDIAN__ */
-#define BYTEORDER 0x4321
-#endif /* ENDIAN CHECK */
#endif /* NeXT */
/* CASTI32:
@@ -1316,22 +1341,6 @@
/*#define I_SYS_TIME /**/
/*#define I_SYS_TIME_KERNEL /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* VAL_O_NONBLOCK:
* This symbol is to be used during open() or fcntl(F_SETFL) to turn on
* non-blocking I/O for the file descriptor. Note that there is no way
@@ -1538,6 +1547,30 @@
*/
/*#define HAS_GETHOSTENT /**/
+/* HAS_GETHOSTNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * gethostname() routine to derive the host name. See also HAS_UNAME
+ * and PHOSTNAME.
+ */
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+/* PHOSTNAME:
+ * This symbol, if defined, indicates the command to feed to the
+ * popen() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and HAS_UNAME. Note that the command uses a fully qualified path,
+ * so that it is safe even if used by a process with super-user
+ * privileges.
+ */
+#define HAS_GETHOSTNAME /**/
+#define HAS_UNAME /**/
+#undef HAS_PHOSTNAME
+#ifdef HAS_PHOSTNAME
+#define PHOSTNAME "" /* How to get the host name */
+#endif
+
/* HAS_GETNETBYADDR:
* This symbol, if defined, indicates that the getnetbyaddr() routine is
* available to look up networks by their IP addresses.
@@ -1649,6 +1682,12 @@
#define LONGLONGSIZE 8 /**/
#endif
+/* HAS_MEMCHR:
+ * This symbol, if defined, indicates that the memchr routine is available
+ * to locate characters within a C string.
+ */
+/*#define HAS_MEMCHR /**/
+
/* HAS_MMAP:
* This symbol, if defined, indicates that the mmap system call is
* available to map a file into memory.
@@ -1847,6 +1886,11 @@
/*#define USE_SEMCTL_SEMUN /**/
/*#define USE_SEMCTL_SEMID_DS /**/
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK /**/
+
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
@@ -2044,6 +2088,18 @@
*/
/*#define HAS_FTELLO /**/
+/* HAS_GETMNTENT:
+ * This symbol, if defined, indicates that the getmntent routine is
+ * available to iterate through mounted file systems.
+ */
+/*#define HAS_GETMNTENT /**/
+
+/* HAS_HASMNTOPT:
+ * This symbol, if defined, indicates that the hasmntopt routine is
+ * available to query the mount options of file systems.
+ */
+/*#define HAS_HASMNTOPT /**/
+
/* HAS_MADVISE:
* This symbol, if defined, indicates that the madvise system call is
* available to map a file into memory.
@@ -2056,18 +2112,6 @@
*/
/*#define HAS_MPROTECT /**/
-/* MULTIARCH:
- * This symbol, if defined, indicates that we have a multiarchitecture
- * build.
- */
-/*#define MULTIARCH /**/
-
-/* CROSSCOMPILE:
- * This symbol, if defined, indicates that we have a cross-compile
- * build.
- */
-/*#define MULTIARCH /**/
-
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
* available to do gather reads. You will also need <sys/uio.h>
@@ -2083,21 +2127,21 @@
/* HAS_FSTATFS:
* This symbol, if defined, indicates that the fstatfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/* HAS_STRUCT_STATFS_FLAGS:
* This symbol, if defined, indicates that the struct statfs
* does have the f_flags member containing the mount flags of
* the filesystem holding the file.
- * This kind of struct statfs is coming from sys/mount.h (BSD)
- * and not from sys/statfs.h (SYSV).
+ * This kind of struct statfs is coming from sys/mount.h (BSD),
+ * not from sys/statfs.h (SYSV).
*/
/*#define HAS_FSTATFS /**/
/*#define HAS_STRUCT_STATFS_FLAGS /**/
/* HAS_FSTATVFS:
* This symbol, if defined, indicates that the fstatvfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/*#define HAS_FSTATVFS /**/
@@ -2157,6 +2201,20 @@
*/
#define USE_DYNAMIC_LOADING /**/
+/* FFLUSH_NULL:
+ * This symbol, if defined, tells that fflush(NULL) does flush
+ * all pending stdio output.
+ */
+/* FFLUSH_ALL:
+ * This symbol, if defined, tells that to flush
+ * all pending stdio output one must loop through all
+ * the stdio file handles stored in an array and fflush them.
+ * Note that if fflushNULL is defined, fflushall will not
+ * even be probed for and will be left undefined.
+ */
+#define FFLUSH_NULL /**/
+/*#define FFLUSH_ALL /**/
+
/* DB_Prefix_t:
* This symbol contains the type of the prefix structure element
* in the <db.h> header file. In older versions of DB, it was
@@ -2188,6 +2246,12 @@
*/
/*#define I_MNTENT /**/
+/* I_NETINET_TCP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/tcp.h>.
+ */
+/*#define I_NETINET_TCP /**/
+
/* I_POLL:
* This symbol, if defined, indicates that <poll.h> exists and
* should be included.
@@ -2389,6 +2453,17 @@
/*#define HAS_FTELLO64 /**/
/*#define HAS_TMPFILE64 /**/
+/* HAS_STDIO_STREAM_ARRAY:
+ * This symbol, if defined, tells that there is an array
+ * holding the stdio streams.
+ */
+/* STDIO_STREAM_ARRAY:
+ * This symbol tells the name of the array holding the stdio streams.
+ * Usual values include _iob, __iob, and __sF.
+ */
+/*#define HAS_STDIO_STREAM_ARRAY /**/
+#define STDIO_STREAM_ARRAY undef
+
/* USE_64_BITS:
* This symbol, if defined, indicates that 64-bit interfaces should
* be used when available. If not defined, the native default interfaces
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 432e95d95d..601267d8ec 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -224,27 +224,6 @@
*/
/*#define HAS_GETGROUPS /**/
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name. See also HAS_GETHOSTNAME and HAS_UNAME.
- * Note that the command uses a fully qualified path, so that it is safe
- * even if used by a process with super-user privileges.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define PHOSTNAME "" / * How to get the host name */
-
/* HAS_GETLOGIN:
* This symbol, if defined, indicates that the getlogin routine is
* available to get the login name.
@@ -708,11 +687,6 @@
*/
#define HAS_UMASK /**/
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK /**/
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1053,20 +1027,54 @@
*/
/*#define I_SYS_SECURITY /**/
+/* CROSSCOMPILE:
+ * This symbol, if defined, signifies that we our
+ * build process is a cross-compilation.
+ */
+/*#define CROSSCOMPILE /**/
+
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
+ */
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
+
+/* MULTIARCH:
+ * This symbol, if defined, signifies that the build
+ * process will produce some binary files that are going to be
+ * used in a cross-platform environment. This is the case for
+ * example with the NeXT "fat" binaries that contain executables
+ * for several CPUs.
+ */
+/*#define MULTIARCH /**/
+
/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8. The default is eight,
+ * for safety.
*/
-#define MEM_ALIGNBYTES 8 /**/
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# define MEM_ALIGNBYTES 8
+#else
+#define MEM_ALIGNBYTES 8
+#endif
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
* i.e. 0x1234 or 0x4321, etc...
+ * If the compiler supports cross-compiling or multiple-architecture
+ * binaries (eg. on NeXT systems), use compiler-defined macros to
+ * determine the byte order.
* On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
* Binaries (MAB) on either big endian or little endian machines.
* The endian-ness is available at compile-time. This only matters
@@ -1077,14 +1085,31 @@
* so the default case (for NeXT) is big endian to catch them.
* This might matter for NeXT 3.0.
*/
-#ifndef NeXT
+#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+# ifdef __LITTLE_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x1234
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x12345678
+# endif
+# endif
+# else
+# ifdef __BIG_ENDIAN__
+# if LONGSIZE == 4
+# define BYTEORDER 0x4321
+# else
+# if LONGSIZE == 8
+# define BYTEORDER 0x87654321
+# endif
+# endif
+# endif
+# endif
+# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
+# define BYTEORDER 0x4321
+# endif
+#else
#define BYTEORDER 0x1234 /* large digits for MSB */
-#else /* NeXT */
-#ifdef __LITTLE_ENDIAN__
-#define BYTEORDER 0x1234
-#else /* __BIG_ENDIAN__ */
-#define BYTEORDER 0x4321
-#endif /* ENDIAN CHECK */
#endif /* NeXT */
/* CASTI32:
@@ -1316,22 +1341,6 @@
/*#define I_SYS_TIME /**/
/*#define I_SYS_TIME_KERNEL /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* VAL_O_NONBLOCK:
* This symbol is to be used during open() or fcntl(F_SETFL) to turn on
* non-blocking I/O for the file descriptor. Note that there is no way
@@ -1538,6 +1547,30 @@
*/
/*#define HAS_GETHOSTENT /**/
+/* HAS_GETHOSTNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * gethostname() routine to derive the host name. See also HAS_UNAME
+ * and PHOSTNAME.
+ */
+/* HAS_UNAME:
+ * This symbol, if defined, indicates that the C program may use the
+ * uname() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and PHOSTNAME.
+ */
+/* PHOSTNAME:
+ * This symbol, if defined, indicates the command to feed to the
+ * popen() routine to derive the host name. See also HAS_GETHOSTNAME
+ * and HAS_UNAME. Note that the command uses a fully qualified path,
+ * so that it is safe even if used by a process with super-user
+ * privileges.
+ */
+#define HAS_GETHOSTNAME /**/
+#define HAS_UNAME /**/
+#undef HAS_PHOSTNAME
+#ifdef HAS_PHOSTNAME
+#define PHOSTNAME "" /* How to get the host name */
+#endif
+
/* HAS_GETNETBYADDR:
* This symbol, if defined, indicates that the getnetbyaddr() routine is
* available to look up networks by their IP addresses.
@@ -1649,6 +1682,12 @@
#define LONGLONGSIZE 8 /**/
#endif
+/* HAS_MEMCHR:
+ * This symbol, if defined, indicates that the memchr routine is available
+ * to locate characters within a C string.
+ */
+/*#define HAS_MEMCHR /**/
+
/* HAS_MMAP:
* This symbol, if defined, indicates that the mmap system call is
* available to map a file into memory.
@@ -1847,6 +1886,11 @@
/*#define USE_SEMCTL_SEMUN /**/
/*#define USE_SEMCTL_SEMID_DS /**/
+/* HAS_VFORK:
+ * This symbol, if defined, indicates that vfork() exists.
+ */
+/*#define HAS_VFORK /**/
+
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
@@ -2044,6 +2088,18 @@
*/
/*#define HAS_FTELLO /**/
+/* HAS_GETMNTENT:
+ * This symbol, if defined, indicates that the getmntent routine is
+ * available to iterate through mounted file systems.
+ */
+/*#define HAS_GETMNTENT /**/
+
+/* HAS_HASMNTOPT:
+ * This symbol, if defined, indicates that the hasmntopt routine is
+ * available to query the mount options of file systems.
+ */
+/*#define HAS_HASMNTOPT /**/
+
/* HAS_MADVISE:
* This symbol, if defined, indicates that the madvise system call is
* available to map a file into memory.
@@ -2056,18 +2112,6 @@
*/
/*#define HAS_MPROTECT /**/
-/* MULTIARCH:
- * This symbol, if defined, indicates that we have a multiarchitecture
- * build.
- */
-/*#define MULTIARCH /**/
-
-/* CROSSCOMPILE:
- * This symbol, if defined, indicates that we have a cross-compile
- * build.
- */
-/*#define MULTIARCH /**/
-
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
* available to do gather reads. You will also need <sys/uio.h>
@@ -2083,21 +2127,21 @@
/* HAS_FSTATFS:
* This symbol, if defined, indicates that the fstatfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/* HAS_STRUCT_STATFS_FLAGS:
* This symbol, if defined, indicates that the struct statfs
* does have the f_flags member containing the mount flags of
* the filesystem holding the file.
- * This kind of struct statfs is coming from sys/mount.h (BSD)
- * and not from sys/statfs.h (SYSV).
+ * This kind of struct statfs is coming from sys/mount.h (BSD),
+ * not from sys/statfs.h (SYSV).
*/
/*#define HAS_FSTATFS /**/
/*#define HAS_STRUCT_STATFS_FLAGS /**/
/* HAS_FSTATVFS:
* This symbol, if defined, indicates that the fstatvfs routine is
- * available to do stat filesystems of file descriptors.
+ * available to stat filesystems of file descriptors.
*/
/*#define HAS_FSTATVFS /**/
@@ -2157,6 +2201,20 @@
*/
#define USE_DYNAMIC_LOADING /**/
+/* FFLUSH_NULL:
+ * This symbol, if defined, tells that fflush(NULL) does flush
+ * all pending stdio output.
+ */
+/* FFLUSH_ALL:
+ * This symbol, if defined, tells that to flush
+ * all pending stdio output one must loop through all
+ * the stdio file handles stored in an array and fflush them.
+ * Note that if fflushNULL is defined, fflushall will not
+ * even be probed for and will be left undefined.
+ */
+#define FFLUSH_NULL /**/
+/*#define FFLUSH_ALL /**/
+
/* DB_Prefix_t:
* This symbol contains the type of the prefix structure element
* in the <db.h> header file. In older versions of DB, it was
@@ -2188,6 +2246,12 @@
*/
/*#define I_MNTENT /**/
+/* I_NETINET_TCP:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/tcp.h>.
+ */
+/*#define I_NETINET_TCP /**/
+
/* I_POLL:
* This symbol, if defined, indicates that <poll.h> exists and
* should be included.
@@ -2389,6 +2453,17 @@
/*#define HAS_FTELLO64 /**/
/*#define HAS_TMPFILE64 /**/
+/* HAS_STDIO_STREAM_ARRAY:
+ * This symbol, if defined, tells that there is an array
+ * holding the stdio streams.
+ */
+/* STDIO_STREAM_ARRAY:
+ * This symbol tells the name of the array holding the stdio streams.
+ * Usual values include _iob, __iob, and __sF.
+ */
+/*#define HAS_STDIO_STREAM_ARRAY /**/
+#define STDIO_STREAM_ARRAY undef
+
/* USE_64_BITS:
* This symbol, if defined, indicates that 64-bit interfaces should
* be used when available. If not defined, the native default interfaces
diff --git a/win32/makedef.pl b/win32/makedef.pl
index 212f0000fd..ec4a164e04 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -87,7 +87,6 @@ Perl_do_msgsnd
Perl_do_semop
Perl_do_shmio
Perl_dump_fds
-Perl_dump_mstats
Perl_init_thread_intern
Perl_my_bzero
Perl_my_htonl
@@ -113,6 +112,7 @@ PL_opsave
if ($define{'MYMALLOC'})
{
emit_symbols [qw(
+ Perl_dump_mstats
Perl_malloc
Perl_mfree
Perl_realloc