summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2020-10-06 17:07:00 +1100
committerTony Cook <tony@develop-help.com>2020-12-01 15:29:33 +1100
commit92b3a3ebc05e3ce0e84a1ccff46487ca2200b471 (patch)
treefbeb49a61e3dca1e48e9382b4e316b430628623a /win32
parentc1ec4bdd803f587dd2ae76548bca0ae59d0fe84b (diff)
downloadperl-92b3a3ebc05e3ce0e84a1ccff46487ca2200b471.tar.gz
Win32: add lstat(), fetch st_dev and st_ino and fetch st_nlink for fstat
We need lstat() for various modules to work well with symlinks, and the same modules often want to check for matches on the device and inode number. The values we're using for st_ino match those that the Python and Rust libraries use, and Go uses the same volume and file index values for testing if two stat objects refer to the same file. They aren't entirely unique, given ReFS uses 128-bit file ids, but the API used to check for this (GetFileInformationByHandleEx() for FileIdInfo) is only available on server operating systems, so I can't directly test it anyway.
Diffstat (limited to 'win32')
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/config_H.gc567
-rw-r--r--win32/config_H.vc558
-rw-r--r--win32/perlhost.h2
-rw-r--r--win32/win32.c199
-rw-r--r--win32/win32.h32
-rw-r--r--win32/win32iop.h2
8 files changed, 942 insertions, 422 deletions
diff --git a/win32/config.gc b/win32/config.gc
index c632ba93c3..c7e619620b 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -358,7 +358,7 @@ d_lrintl='define'
d_lround='define'
d_lroundl='define'
d_lseekproto='define'
-d_lstat='undef'
+d_lstat='define'
d_madvise='undef'
d_malloc_good_size='undef'
d_malloc_size='undef'
diff --git a/win32/config.vc b/win32/config.vc
index 3f68e7554f..294cdacbb2 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -358,7 +358,7 @@ d_lrintl='undef'
d_lround='undef'
d_lroundl='undef'
d_lseekproto='define'
-d_lstat='undef'
+d_lstat='define'
d_madvise='undef'
d_malloc_good_size='undef'
d_malloc_size='undef'
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 233eea3f65..a068b08bba 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -9,8 +9,8 @@
/* Package name : perl5
* Source directory :
- * Configuration time: Tue Oct 17 08:44:03 2017
- * Configured by : shay
+ * Configuration time: Wed Oct 7 16:27:47 2020
+ * Configured by : tony
* Target system :
*/
@@ -32,7 +32,7 @@
* This symbol, if defined, indicates that the cbrt() (cube root)
* function is available.
*/
-#define HAS_CBRT /**/
+#define HAS_CBRT /**/
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
@@ -216,7 +216,7 @@
* This symbol, if defined, indicates that the lstat routine is
* available to do file stats on symbolic links.
*/
-/*#define HAS_LSTAT / **/
+#define HAS_LSTAT /**/
/* HAS_MBLEN:
* This symbol, if defined, indicates that the mblen routine is available
@@ -257,6 +257,12 @@
*/
#define HAS_MKTIME /**/
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+/*#define HAS_MSG / **/
+
/* HAS_MSYNC:
* This symbol, if defined, indicates that the msync system call is
* available to synchronize a mapped file.
@@ -366,6 +372,12 @@
*/
#define HAS_SELECT /**/
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+/*#define HAS_SEM / **/
+
/* HAS_SETEGID:
* This symbol, if defined, indicates that the setegid routine is available
* to change the effective gid of the current program.
@@ -392,12 +404,6 @@
*/
/*#define HAS_SETLINEBUF / **/
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
/* HAS_SETPGID:
* This symbol, if defined, indicates that the setpgid(pid, gpid)
* routine is available to set process group ID.
@@ -796,14 +802,14 @@
/*#define HAS_EACCESS / **/
/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/access.h>.
*/
/*#define I_SYS_ACCESS / **/
/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/security.h>.
*/
/*#define I_SYS_SECURITY / **/
@@ -811,7 +817,7 @@
* This symbol contains the number of bytes required to align a
* double, or a long double when applicable. Usual values are 2,
* 4 and 8. The default is eight, for safety. For cross-compiling
- * or multiarch support, Configure will set a minimum of 8.
+ * or multiarch support, Configure will set a minimum of 8.
*/
#define MEM_ALIGNBYTES 8
@@ -843,7 +849,7 @@
# endif
# endif
#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
+#define BYTEORDER 0x12345678 /* large digits for MSB */
#endif
/* CHARBITS:
@@ -914,7 +920,7 @@
* the GNU C library is being used. A better check is to use
* the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
*/
-/*#define HAS_GNULIBC / **/
+/*#define HAS_GNULIBC / **/
#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
#endif
@@ -1066,12 +1072,12 @@
* This symbol is defined if using the FILE_ptr macro as an lvalue
* to increase the pointer by n leaves File_cnt(fp) unchanged.
*/
-#define USE_STDIO_PTR /**/
+#define USE_STDIO_PTR /**/
#ifdef USE_STDIO_PTR
#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
+#define STDIO_PTR_LVALUE /**/
#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
+#define STDIO_CNT_LVALUE /**/
/*#define STDIO_PTR_LVAL_SETS_CNT / **/
#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
#endif
@@ -1096,7 +1102,7 @@
* structure pointed to its argument. This macro will always be defined
* if USE_STDIO_BASE is defined.
*/
-#define USE_STDIO_BASE /**/
+#define USE_STDIO_BASE /**/
#ifdef USE_STDIO_BASE
#define FILE_base(fp) ((fp)->_base)
#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
@@ -1109,8 +1115,8 @@
#define DOUBLESIZE 8 /**/
/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
+ * This symbol is always defined, and indicates to the C program that
+ * it should include <time.h>.
*/
/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
@@ -1167,7 +1173,7 @@
* the compiler supports (void *); otherwise it will be
* sizeof(char *).
*/
-#define PTRSIZE 4 /**/
+#define PTRSIZE 8 /**/
/* Drand01:
* This macro is to be used to generate uniformly distributed
@@ -1202,13 +1208,13 @@
* to get any typedef'ed information.
* We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
*/
-#define SSize_t int /* signed count of bytes */
+#define SSize_t long long /* signed count of bytes */
/* EBCDIC:
* This symbol, if defined, indicates that this system uses
* EBCDIC encoding.
*/
-/*#define EBCDIC / **/
+/*#define EBCDIC / **/
/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
@@ -1240,7 +1246,7 @@
*/
#define BIN "c:\\perl\\bin" /**/
#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
+#define PERL_RELOCATABLE_INC "undef" /**/
/* PERL_INC_VERSION_LIST:
* This variable specifies the list of subdirectories in over
@@ -1253,7 +1259,7 @@
/* INSTALL_USR_BIN_PERL:
* This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
+ * also as /usr/bin/perl.
*/
/*#define INSTALL_USR_BIN_PERL / **/
@@ -1363,7 +1369,7 @@
* feature tests from Configure are generally more reliable.
*/
#define OSNAME "MSWin32" /**/
-#define OSVERS "6.1" /**/
+#define OSVERS "10.0.18363.1082" /**/
/* CAT2:
* This macro concatenates 2 tokens together.
@@ -1373,7 +1379,6 @@
*/
#if 42 == 1
#define CAT2(a,b) a/**/b
-#undef STRINGIFY
#define STRINGIFY(a) "a"
#endif
#if 42 == 42
@@ -1381,7 +1386,6 @@
#define PeRl_StGiFy(a) #a
#define CAT2(a,b) PeRl_CaTiFy(a,b)
#define StGiFy(a) PeRl_StGiFy(a)
-#undef STRINGIFY
#define STRINGIFY(a) PeRl_StGiFy(a)
#endif
#if 42 != 1 && 42 != 42
@@ -1391,7 +1395,7 @@
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
* call a wrapper. See CPPRUN.
*/
/* CPPMINUS:
@@ -1425,11 +1429,6 @@
*/
#define HAS_ACCESS /**/
-
-/* The HASATTRIBUTE_* defines are left undefined here because they vary from
- * one version of GCC to another. Instead, they are defined on the basis of
- * the compiler version in <perl.h>.
- */
/* HASATTRIBUTE_FORMAT:
* Can we handle GCC attribute for checking printf-style formats
*/
@@ -1457,6 +1456,10 @@
/* HASATTRIBUTE_WARN_UNUSED_RESULT:
* Can we handle GCC attribute for warning on unused results
*/
+/* HASATTRIBUTE_ALWAYS_INLINE:
+ * Can we handle GCC attribute for functions that should always be
+ * inlined.
+ */
/*#define HASATTRIBUTE_DEPRECATED / **/
/*#define HASATTRIBUTE_FORMAT / **/
/*#define PRINTF_FORMAT_NULL_OK / **/
@@ -1466,6 +1469,7 @@
/*#define HASATTRIBUTE_PURE / **/
/*#define HASATTRIBUTE_UNUSED / **/
/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
+/*#define HASATTRIBUTE_ALWAYS_INLINE / **/
/* HAS_BACKTRACE:
* This symbol, if defined, indicates that the backtrace() routine is
@@ -1728,6 +1732,8 @@
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN
* LONG_DOUBLE_IS_VAX_H_FLOAT
* LONG_DOUBLE_IS_UNKNOWN_FORMAT
* It is only defined if the system supports long doubles.
@@ -1756,10 +1762,10 @@
* This symbol, if defined, indicates that the long double is
* the 128-bit VAX format H.
*/
-#define HAS_LDEXPL /**/
+#define HAS_LDEXPL /**/
#define HAS_LONG_DOUBLE /**/
#ifdef HAS_LONG_DOUBLE
-#define LONG_DOUBLESIZE 12 /**/
+#define LONG_DOUBLESIZE 16 /**/
#define LONG_DOUBLEKIND 3 /**/
#define LONG_DOUBLE_IS_DOUBLE 0
#define LONG_DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN 1
@@ -1799,9 +1805,7 @@
* available to exclusively create and open a uniquely named
* temporary file.
*/
-#if __MINGW64_VERSION_MAJOR >= 4
-#define HAS_MKSTEMP
-#endif
+/*#define HAS_MKSTEMP / **/
/* HAS_MMAP:
* This symbol, if defined, indicates that the mmap system call is
@@ -1815,18 +1819,6 @@
/*#define HAS_MMAP / **/
#define Mmap_t void * /**/
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
/* HAS_SETGRENT:
* This symbol, if defined, indicates that the setgrent routine is
* available for initializing sequential access of the group database.
@@ -1919,6 +1911,10 @@
* This symbol, if defined, indicates the availability of
* struct sockaddr_in6;
*/
+/* HAS_SOCKADDR_STORAGE:
+ * This symbol, if defined, indicates the availability of
+ * struct sockaddr_storage;
+ */
/* HAS_SIN6_SCOPE_ID:
* This symbol, if defined, indicates that the struct sockaddr_in6
* structure has a member called sin6_scope_id.
@@ -1943,6 +1939,7 @@
/*#define HAS_SOCKETPAIR / **/
/*#define HAS_SOCKADDR_SA_LEN / **/
/*#define HAS_SOCKADDR_IN6 / **/
+#define HAS_SOCKADDR_STORAGE /**/
#define HAS_SIN6_SCOPE_ID /**/
/*#define HAS_IP_MREQ / **/
/*#define HAS_IP_MREQ_SOURCE / **/
@@ -1954,7 +1951,7 @@
* st_blksize and st_blocks.
*/
#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
+/*#define USE_STAT_BLOCKS / **/
#endif
/* HAS_SYS_ERRLIST:
@@ -1974,11 +1971,11 @@
* This symbol, if defined, indicates that the union semun is
* defined by including <sys/sem.h>. If not, the user code
* probably needs to define it as:
- * union semun {
+ * union semun {
* int val;
* struct semid_ds *buf;
* unsigned short *array;
- * }
+ * }
*/
/* USE_SEMCTL_SEMUN:
* This symbol, if defined, indicates that union semun is
@@ -2173,7 +2170,7 @@
/* Free_t:
* This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+ * void, but occasionally int.
*/
/* Malloc_t:
* This symbol is the type of pointer returned by malloc and realloc.
@@ -2269,7 +2266,7 @@
* This symbol, if defined, indicates that the atoll routine is
* available to convert strings into long longs.
*/
-/*#define HAS_ATOLL / **/
+#define HAS_ATOLL /**/
/* HAS__FWALK:
* This symbol, if defined, indicates that the _fwalk system call is
@@ -2277,6 +2274,12 @@
*/
/*#define HAS__FWALK / **/
+/* HAS_ACCEPT4:
+ * This symbol, if defined, indicates that the accept4 routine is
+ * available to accept socket connections.
+ */
+/*#define HAS_ACCEPT4 / **/
+
/* HAS_ACOSH:
* This symbol, if defined, indicates that the acosh routine is
* available to do the inverse hyperbolic cosine function.
@@ -2311,6 +2314,22 @@
/*#define HAS_BUILTIN_EXPECT / **/
/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
+/* HAS_BUILTIN_ADD_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_add_overflow for adding integers with overflow checks.
+ */
+/* HAS_BUILTIN_SUB_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_sub_overflow for subtracting integers with overflow checks.
+ */
+/* HAS_BUILTIN_MUL_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_mul_overflow for multiplying integers with overflow checks.
+ */
+/*#define HAS_BUILTIN_ADD_OVERFLOW / **/
+/*#define HAS_BUILTIN_SUB_OVERFLOW / **/
+/*#define HAS_BUILTIN_MUL_OVERFLOW / **/
+
/* HAS_C99_VARIADIC_MACROS:
* If defined, the compiler supports C99 variadic macros.
*/
@@ -2390,7 +2409,13 @@
* makes sense if you *have* dlsym, which we will presume is the
* case if you're using dl_dlopen.xs.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
+/*#define DLSYM_NEEDS_UNDERSCORE / **/
+
+/* HAS_DUP3:
+ * This symbol, if defined, indicates that the dup3 routine is
+ * available to duplicate file descriptors.
+ */
+/*#define HAS_DUP3 / **/
/* HAS_ERF:
* This symbol, if defined, indicates that the erf routine is
@@ -2542,22 +2567,22 @@
* available to classify doubles. Available for example in HP-UX.
* The returned values are defined in <math.h> and are
*
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
+ * FP_NORMAL Normalized
+ * FP_ZERO Zero
+ * FP_INFINITE Infinity
+ * FP_SUBNORMAL Denormalized
+ * FP_NAN NaN
*
*/
/* HAS_FP_CLASSIFY:
* This symbol, if defined, indicates that the fp_classify routine is
* available to classify doubles. The values are defined in <math.h>
*
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
+ * FP_NORMAL Normalized
+ * FP_ZERO Zero
+ * FP_INFINITE Infinity
+ * FP_SUBNORMAL Denormalized
+ * FP_NAN NaN
*
*/
/*#define HAS_FPCLASSIFY / **/
@@ -2590,7 +2615,7 @@
/* HAS_FPOS64_T:
* This symbol will be defined if the C compiler supports fpos64_t.
*/
-/*#define HAS_FPOS64_T / **/
+/*#define HAS_FPOS64_T / **/
/* HAS_FREXPL:
* This symbol, if defined, indicates that the frexpl routine is
@@ -2761,8 +2786,8 @@
/*#define HAS_INETPTON / **/
/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
+ * This symbol will defined if the C compiler supports int64_t.
+ * Usually the <inttypes.h> needs to be included, but sometimes
* <sys/types.h> is enough.
*/
/*#define HAS_INT64_T / **/
@@ -2832,7 +2857,7 @@
* j0l() function is available for Bessel functions of the first
* kind of the order zero, for long doubles.
*/
-#define HAS_J0 /**/
+#define HAS_J0 /**/
/*#define HAS_J0L / **/
/* HAS_LC_MONETARY_2008:
@@ -2847,7 +2872,7 @@
* of significant digits in a long double precision number. Unlike
* for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
*/
-#define HAS_LDBL_DIG /**/
+#define HAS_LDBL_DIG /**/
/* HAS_LGAMMA:
* This symbol, if defined, indicates that the lgamma routine is
@@ -2963,6 +2988,9 @@
* This symbol, if defined, indicates that the memmem routine is
* available to return a pointer to the start of the first occurrence
* of a substring in a memory area (or NULL if not found).
+ * In glibc, memmem is a GNU extension. The function is visible in
+ * libc, but the prototype is only visible if _GNU_SOURCE is #defined.
+ * Thus we only define this if both the prototype and symbol are found.
*/
/*#define HAS_MEMMEM / **/
@@ -2979,6 +3007,13 @@
*/
/*#define HAS_MKDTEMP / **/
+/* HAS_MKOSTEMP:
+ * This symbol, if defined, indicates that the mkostemp routine is
+ * available to exclusively create and open a uniquely named (with a
+ * suffix) temporary file.
+ */
+/*#define HAS_MKOSTEMP / **/
+
/* HAS_MKSTEMPS:
* This symbol, if defined, indicates that the mkstemps routine is
* available to exclusively create and open a uniquely named
@@ -2997,7 +3032,7 @@
* to the program to supply one.
*/
#define HAS_MODFL /**/
-/*#define HAS_MODFL_PROTO / **/
+#define HAS_MODFL_PROTO /**/
/* HAS_MPROTECT:
* This symbol, if defined, indicates that the mprotect system call is
@@ -3017,6 +3052,12 @@
*/
#define HAS_NAN /**/
+/* HAS_NANOSLEEP:
+ * This symbol, if defined, indicates that the nanosleep
+ * system call is available to sleep with 1E-9 sec accuracy.
+ */
+/*#define HAS_NANOSLEEP / **/
+
/* HAS_NEARBYINT:
* This symbol, if defined, indicates that the nearbyint routine is
* available to return the integral value closest to (according to
@@ -3037,6 +3078,10 @@
* This symbol, if defined, indicates that the uselocale routine is
* available to set the current locale for the calling thread.
*/
+/* HAS_DUPLOCALE:
+ * This symbol, if defined, indicates that the duplocale routine is
+ * available to duplicate a locale object.
+ */
/* HAS_QUERYLOCALE:
* This symbol, if defined, indicates that the querylocale routine is
* available to return the name of the locale for a category mask.
@@ -3048,6 +3093,7 @@
/*#define HAS_NEWLOCALE / **/
/*#define HAS_FREELOCALE / **/
/*#define HAS_USELOCALE / **/
+/*#define HAS_DUPLOCALE / **/
/*#define HAS_QUERYLOCALE / **/
/*#define I_XLOCALE / **/
@@ -3075,7 +3121,13 @@
/* HAS_OFF64_T:
* This symbol will be defined if the C compiler supports off64_t.
*/
-/*#define HAS_OFF64_T / **/
+/*#define HAS_OFF64_T / **/
+
+/* HAS_PIPE2:
+ * This symbol, if defined, indicates that the pipe2 routine is
+ * available to create an inter-process channel.
+ */
+/*#define HAS_PIPE2 / **/
/* HAS_PRCTL:
* This symbol, if defined, indicates that the prctl routine is
@@ -3114,7 +3166,7 @@
/* HAS_PTRDIFF_T:
* This symbol will be defined if the C compiler supports ptrdiff_t.
*/
-#define HAS_PTRDIFF_T /**/
+#define HAS_PTRDIFF_T /**/
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
@@ -3188,6 +3240,17 @@
*/
/*#define HAS_SETITIMER / **/
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+/* SETLOCALE_ACCEPTS_ANY_LOCALE_NAME:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available and it accepts any input locale name as valid.
+ */
+#define HAS_SETLOCALE /**/
+/*#define SETLOCALE_ACCEPTS_ANY_LOCALE_NAME / **/
+
/* HAS_SETPROCTITLE:
* This symbol, if defined, indicates that the setproctitle routine is
* available to set process title.
@@ -3320,6 +3383,12 @@
*/
/*#define HAS_STRLCPY / **/
+/* HAS_STRNLEN:
+ * This symbol, if defined, indicates that the strnlen () routine is
+ * available to check the length of a string up to a maximum.
+ */
+/*#define HAS_STRNLEN / **/
+
/* HAS_STRTOLD:
* This symbol, if defined, indicates that the strtold routine is
* available to convert strings to long doubles.
@@ -3330,7 +3399,7 @@
* This symbol, if defined, indicates that the strtoll routine is
* available to convert strings to long longs.
*/
-/*#define HAS_STRTOLL / **/
+#define HAS_STRTOLL /**/
/* HAS_STRTOQ:
* This symbol, if defined, indicates that the strtoq routine is
@@ -3342,7 +3411,7 @@
* This symbol, if defined, indicates that the strtoull routine is
* available to convert strings to unsigned long longs.
*/
-/*#define HAS_STRTOULL / **/
+#define HAS_STRTOULL /**/
/* HAS_STRTOUQ:
* This symbol, if defined, indicates that the strtouq routine is
@@ -3410,6 +3479,18 @@
*/
/*#define HAS_TIMEGM / **/
+/* HAS_TOWLOWER:
+ * This symbol, if defined, indicates that the towlower () routine is
+ * available to do case conversion.
+ */
+/*#define HAS_TOWLOWER / **/
+
+/* HAS_TOWUPPER:
+ * This symbol, if defined, indicates that the towupper () routine is
+ * available to do case conversion.
+ */
+/*#define HAS_TOWUPPER / **/
+
/* HAS_TRUNC:
* This symbol, if defined, indicates that the trunc routine is
* available to round doubles towards zero.
@@ -3487,6 +3568,12 @@
*/
#define DEFAULT_INC_EXCLUDES_DOT /**/
+/* USE_STRICT_BY_DEFAULT
+ * This symbol, if defined, enables additional defaults.
+ * At this time it only enables implicit strict by default.
+ */
+/*#define USE_STRICT_BY_DEFAULT / * use strict by default */
+
/* USE_DYNAMIC_LOADING:
* This symbol, if defined, indicates that dynamic loading of
* some sort is available.
@@ -3506,8 +3593,8 @@
* Note that if fflushNULL is defined, fflushall will not
* even be probed for and will be left undefined.
*/
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
+#define FFLUSH_NULL /**/
+/*#define FFLUSH_ALL / **/
/* I_BFD:
* This symbol, if defined, indicates that <bfd.h> exists and
@@ -3546,10 +3633,10 @@
* For DB version 1 this is always 0.
*/
#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
+#define DB_Prefix_t int /**/
+#define DB_VERSION_MAJOR_CFG 0 /**/
+#define DB_VERSION_MINOR_CFG 0 /**/
+#define DB_VERSION_PATCH_CFG 0 /**/
/* I_FENV:
* This symbol, if defined, indicates to the C program that it should
@@ -3576,8 +3663,8 @@
/*#define I_IEEEFP / **/
/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <inttypes.h>.
*/
/*#define I_INTTYPES / **/
@@ -3606,8 +3693,8 @@
/*#define I_MNTENT / **/
/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/tcp.h>.
*/
/*#define I_NETINET_TCP / **/
@@ -3706,6 +3793,17 @@
*/
/*#define I_USTAT / **/
+/* I_WCHAR:
+ * This symbol, if defined, indicates to the C program that <wchar.h>
+ * is available for inclusion
+ */
+/*#define I_WCHAR / **/
+
+/* I_WCTYPE:
+ * This symbol, if defined, indicates that <wctype.h> exists.
+ */
+/*#define I_WCTYPE / **/
+
/* DOUBLEINFBYTES:
* This symbol, if defined, is a comma-separated list of
* hexadecimal bytes for the double precision infinity.
@@ -3724,8 +3822,8 @@
*/
#define DOUBLEINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f /**/
#define DOUBLENANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f /**/
-#define LONGDBLINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00 /**/
-#define LONGDBLNANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00 /**/
+#define LONGDBLINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
+#define LONGDBLNANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
/* PERL_PRIfldbl:
* This symbol, if defined, contains the string used by stdio to
@@ -3946,8 +4044,8 @@
* This symbol, if defined, indicates that a variable of type NVTYPE
* stores 0.0 in memory as all bits zero.
*/
-#define IVTYPE long /**/
-#define UVTYPE unsigned long /**/
+#define IVTYPE long long /**/
+#define UVTYPE unsigned long long /**/
#define I8TYPE char /**/
#define U8TYPE unsigned char /**/
#define I16TYPE short /**/
@@ -3959,8 +4057,8 @@
#define U64TYPE unsigned long long /**/
#endif
#define NVTYPE double /**/
-#define IVSIZE 4 /**/
-#define UVSIZE 4 /**/
+#define IVSIZE 8 /**/
+#define UVSIZE 8 /**/
#define I8SIZE 1 /**/
#define U8SIZE 1 /**/
#define I16SIZE 2 /**/
@@ -3972,9 +4070,9 @@
#define U64SIZE 8 /**/
#endif
#define NVSIZE 8 /**/
-#define NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 32
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
+#undef NV_PRESERVES_UV
+#define NV_PRESERVES_UV_BITS 53
+#define NV_OVERFLOWS_INTEGERS_AT (256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0)
#define NV_ZERO_IS_ALLBITS_ZERO
#if UVSIZE == 8
# ifdef BYTEORDER
@@ -4022,11 +4120,11 @@
* This symbol defines the format string used for printing a Perl NV
* using %g-ish floating point format.
*/
-#define IVdf "ld" /**/
-#define UVuf "lu" /**/
-#define UVof "lo" /**/
-#define UVxf "lx" /**/
-#define UVXf "lX" /**/
+#define IVdf "I64d" /**/
+#define UVuf "I64u" /**/
+#define UVof "I64o" /**/
+#define UVxf "I64x" /**/
+#define UVXf "I64X" /**/
#define NVef "e" /**/
#define NVff "f" /**/
#define NVgf "g" /**/
@@ -4038,7 +4136,7 @@
* is either n or 32*ceil(n/32), especially many little-endians do
* the latter. This is only useful if you have select(), naturally.
*/
-#define SELECT_MIN_BITS 32 /**/
+#define SELECT_MIN_BITS 32 /**/
/* ST_INO_SIZE:
* This variable contains the size of struct stat's st_ino in bytes.
@@ -4048,7 +4146,7 @@
* 1 for unsigned, -1 for signed.
*/
#define ST_INO_SIGN 1 /* st_ino sign */
-#define ST_INO_SIZE 4 /* st_ino size */
+#define ST_INO_SIZE 8 /* st_ino size */
/* STARTPERL:
* This variable contains the string to put in front of a perl
@@ -4110,7 +4208,7 @@
* you may need at least to reboot your OS to 64-bit mode.
*/
#ifndef USE_64_BIT_INT
-/*#define USE_64_BIT_INT / **/
+#define USE_64_BIT_INT /**/
#endif
#ifndef USE_64_BIT_ALL
/*#define USE_64_BIT_ALL / **/
@@ -4140,7 +4238,7 @@
/* USE_KERN_PROC_PATHNAME:
* This symbol, if defined, indicates that we can use sysctl with
* KERN_PROC_PATHNAME to get a full path for the executable, and hence
- * convert $^X to an absolute path.
+ * convert $^X to an absolute path.
*/
/*#define USE_KERN_PROC_PATHNAME / **/
@@ -4283,7 +4381,7 @@
* is defined, and 'int *' otherwise. This is only useful if you
* have select(), of course.
*/
-#define Select_fd_set_t Perl_fd_set * /**/
+#define Select_fd_set_t Perl_fd_set * /**/
/* Sock_size_t:
* This symbol holds the type used for the size argument of
@@ -4297,7 +4395,7 @@
* where library files may be held under a private library, for
* instance.
*/
-#define ARCHNAME "MSWin32-x86-perlio" /**/
+#define ARCHNAME "MSWin32-x64-perlio" /**/
/* HAS_ASCTIME_R:
* This symbol, if defined, indicates that the asctime_r routine
@@ -4309,8 +4407,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
* is defined.
*/
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
+/*#define HAS_ASCTIME_R / **/
+#define ASCTIME_R_PROTO 0 /**/
/* HAS_CRYPT_R:
* This symbol, if defined, indicates that the crypt_r routine
@@ -4322,8 +4420,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
* is defined.
*/
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
+/*#define HAS_CRYPT_R / **/
+#define CRYPT_R_PROTO 0 /**/
/* HAS_CTERMID_R:
* This symbol, if defined, indicates that the ctermid_r routine
@@ -4335,8 +4433,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
* is defined.
*/
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
+/*#define HAS_CTERMID_R / **/
+#define CTERMID_R_PROTO 0 /**/
/* HAS_CTIME_R:
* This symbol, if defined, indicates that the ctime_r routine
@@ -4348,8 +4446,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
* is defined.
*/
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
+/*#define HAS_CTIME_R / **/
+#define CTIME_R_PROTO 0 /**/
/* HAS_DRAND48_R:
* This symbol, if defined, indicates that the drand48_r routine
@@ -4361,8 +4459,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
* is defined.
*/
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
+/*#define HAS_DRAND48_R / **/
+#define DRAND48_R_PROTO 0 /**/
/* HAS_ENDGRENT_R:
* This symbol, if defined, indicates that the endgrent_r routine
@@ -4374,8 +4472,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
* is defined.
*/
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
+/*#define HAS_ENDGRENT_R / **/
+#define ENDGRENT_R_PROTO 0 /**/
/* HAS_ENDHOSTENT_R:
* This symbol, if defined, indicates that the endhostent_r routine
@@ -4387,8 +4485,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
* is defined.
*/
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
+/*#define HAS_ENDHOSTENT_R / **/
+#define ENDHOSTENT_R_PROTO 0 /**/
/* HAS_ENDNETENT_R:
* This symbol, if defined, indicates that the endnetent_r routine
@@ -4400,8 +4498,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
* is defined.
*/
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
+/*#define HAS_ENDNETENT_R / **/
+#define ENDNETENT_R_PROTO 0 /**/
/* HAS_ENDPROTOENT_R:
* This symbol, if defined, indicates that the endprotoent_r routine
@@ -4413,8 +4511,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
* is defined.
*/
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
+/*#define HAS_ENDPROTOENT_R / **/
+#define ENDPROTOENT_R_PROTO 0 /**/
/* HAS_ENDPWENT_R:
* This symbol, if defined, indicates that the endpwent_r routine
@@ -4426,8 +4524,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
* is defined.
*/
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
+/*#define HAS_ENDPWENT_R / **/
+#define ENDPWENT_R_PROTO 0 /**/
/* HAS_ENDSERVENT_R:
* This symbol, if defined, indicates that the endservent_r routine
@@ -4439,8 +4537,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
* is defined.
*/
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
+/*#define HAS_ENDSERVENT_R / **/
+#define ENDSERVENT_R_PROTO 0 /**/
/* HAS_GETGRENT_R:
* This symbol, if defined, indicates that the getgrent_r routine
@@ -4452,8 +4550,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
* is defined.
*/
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
+/*#define HAS_GETGRENT_R / **/
+#define GETGRENT_R_PROTO 0 /**/
/* HAS_GETGRGID_R:
* This symbol, if defined, indicates that the getgrgid_r routine
@@ -4465,8 +4563,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
* is defined.
*/
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
+/*#define HAS_GETGRGID_R / **/
+#define GETGRGID_R_PROTO 0 /**/
/* HAS_GETGRNAM_R:
* This symbol, if defined, indicates that the getgrnam_r routine
@@ -4478,8 +4576,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
* is defined.
*/
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
+/*#define HAS_GETGRNAM_R / **/
+#define GETGRNAM_R_PROTO 0 /**/
/* HAS_GETHOSTBYADDR_R:
* This symbol, if defined, indicates that the gethostbyaddr_r routine
@@ -4491,8 +4589,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
* is defined.
*/
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
+/*#define HAS_GETHOSTBYADDR_R / **/
+#define GETHOSTBYADDR_R_PROTO 0 /**/
/* HAS_GETHOSTBYNAME_R:
* This symbol, if defined, indicates that the gethostbyname_r routine
@@ -4504,8 +4602,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
* is defined.
*/
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETHOSTBYNAME_R / **/
+#define GETHOSTBYNAME_R_PROTO 0 /**/
/* HAS_GETHOSTENT_R:
* This symbol, if defined, indicates that the gethostent_r routine
@@ -4517,8 +4615,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
* is defined.
*/
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
+/*#define HAS_GETHOSTENT_R / **/
+#define GETHOSTENT_R_PROTO 0 /**/
/* HAS_GETLOGIN_R:
* This symbol, if defined, indicates that the getlogin_r routine
@@ -4530,8 +4628,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
* is defined.
*/
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
+/*#define HAS_GETLOGIN_R / **/
+#define GETLOGIN_R_PROTO 0 /**/
/* HAS_GETNETBYADDR_R:
* This symbol, if defined, indicates that the getnetbyaddr_r routine
@@ -4543,8 +4641,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
* is defined.
*/
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
+/*#define HAS_GETNETBYADDR_R / **/
+#define GETNETBYADDR_R_PROTO 0 /**/
/* HAS_GETNETBYNAME_R:
* This symbol, if defined, indicates that the getnetbyname_r routine
@@ -4556,8 +4654,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
* is defined.
*/
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETNETBYNAME_R / **/
+#define GETNETBYNAME_R_PROTO 0 /**/
/* HAS_GETNETENT_R:
* This symbol, if defined, indicates that the getnetent_r routine
@@ -4569,8 +4667,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
* is defined.
*/
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
+/*#define HAS_GETNETENT_R / **/
+#define GETNETENT_R_PROTO 0 /**/
/* HAS_GETPROTOBYNAME_R:
* This symbol, if defined, indicates that the getprotobyname_r routine
@@ -4582,8 +4680,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
* is defined.
*/
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETPROTOBYNAME_R / **/
+#define GETPROTOBYNAME_R_PROTO 0 /**/
/* HAS_GETPROTOBYNUMBER_R:
* This symbol, if defined, indicates that the getprotobynumber_r routine
@@ -4595,8 +4693,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
* is defined.
*/
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
+/*#define HAS_GETPROTOBYNUMBER_R / **/
+#define GETPROTOBYNUMBER_R_PROTO 0 /**/
/* HAS_GETPROTOENT_R:
* This symbol, if defined, indicates that the getprotoent_r routine
@@ -4608,8 +4706,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
* is defined.
*/
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
+/*#define HAS_GETPROTOENT_R / **/
+#define GETPROTOENT_R_PROTO 0 /**/
/* HAS_GETPWENT_R:
* This symbol, if defined, indicates that the getpwent_r routine
@@ -4621,8 +4719,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
* is defined.
*/
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
+/*#define HAS_GETPWENT_R / **/
+#define GETPWENT_R_PROTO 0 /**/
/* HAS_GETPWNAM_R:
* This symbol, if defined, indicates that the getpwnam_r routine
@@ -4634,8 +4732,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
* is defined.
*/
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
+/*#define HAS_GETPWNAM_R / **/
+#define GETPWNAM_R_PROTO 0 /**/
/* HAS_GETPWUID_R:
* This symbol, if defined, indicates that the getpwuid_r routine
@@ -4647,8 +4745,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
* is defined.
*/
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
+/*#define HAS_GETPWUID_R / **/
+#define GETPWUID_R_PROTO 0 /**/
/* HAS_GETSERVBYNAME_R:
* This symbol, if defined, indicates that the getservbyname_r routine
@@ -4660,8 +4758,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
* is defined.
*/
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETSERVBYNAME_R / **/
+#define GETSERVBYNAME_R_PROTO 0 /**/
/* HAS_GETSERVBYPORT_R:
* This symbol, if defined, indicates that the getservbyport_r routine
@@ -4673,8 +4771,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
* is defined.
*/
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
+/*#define HAS_GETSERVBYPORT_R / **/
+#define GETSERVBYPORT_R_PROTO 0 /**/
/* HAS_GETSERVENT_R:
* This symbol, if defined, indicates that the getservent_r routine
@@ -4686,8 +4784,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
* is defined.
*/
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
+/*#define HAS_GETSERVENT_R / **/
+#define GETSERVENT_R_PROTO 0 /**/
/* HAS_GETSPNAM_R:
* This symbol, if defined, indicates that the getspnam_r routine
@@ -4699,8 +4797,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
* is defined.
*/
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
+/*#define HAS_GETSPNAM_R / **/
+#define GETSPNAM_R_PROTO 0 /**/
/* HAS_GMTIME_R:
* This symbol, if defined, indicates that the gmtime_r routine
@@ -4712,8 +4810,14 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
* is defined.
*/
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
+/*#define HAS_GMTIME_R / **/
+#define GMTIME_R_PROTO 0 /**/
+
+/* HAS_LOCALECONV_L:
+ * This symbol, if defined, indicates that the localeconv_l routine is
+ * available to query certain information about a locale.
+ */
+/*#define HAS_LOCALECONV_L / **/
/* HAS_LOCALTIME_R:
* This symbol, if defined, indicates that the localtime_r routine
@@ -4732,14 +4836,35 @@
#define L_R_TZSET
#endif
+/* L_R_TZSET:
+ * If localtime_r() needs tzset, it is defined in this define
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
* is defined.
*/
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
+/*#define HAS_LOCALTIME_R / **/
+#define LOCALTIME_R_PROTO 0 /**/
+
+/* HAS_MBRLEN:
+ * This symbol, if defined, indicates that the mbrlen routine is
+ * available to get the length of multi-byte character strings.
+ */
+/*#define HAS_MBRLEN / **/
+
+/* HAS_MBRTOWC:
+ * This symbol, if defined, indicates that the mbrtowc routine is
+ * available to convert a multi-byte character into a wide character.
+ */
+/*#define HAS_MBRTOWC / **/
+
+/* HAS_THREAD_SAFE_NL_LANGINFO_L:
+ * This symbol, when defined, indicates presence of the nl_langinfo_l()
+ * function, and that it is thread-safe.
+ */
+/*#define HAS_THREAD_SAFE_NL_LANGINFO_L / **/
/* OLD_PTHREAD_CREATE_JOINABLE:
* This symbol, if defined, indicates how to create pthread
@@ -4786,8 +4911,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
* is defined.
*/
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
+/*#define HAS_RANDOM_R / **/
+#define RANDOM_R_PROTO 0 /**/
/* HAS_READDIR64_R:
* This symbol, if defined, indicates that the readdir64_r routine
@@ -4799,8 +4924,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
* is defined.
*/
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
+/*#define HAS_READDIR64_R / **/
+#define READDIR64_R_PROTO 0 /**/
/* HAS_READDIR_R:
* This symbol, if defined, indicates that the readdir_r routine
@@ -4812,8 +4937,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
* is defined.
*/
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
+/*#define HAS_READDIR_R / **/
+#define READDIR_R_PROTO 0 /**/
/* HAS_SETGRENT_R:
* This symbol, if defined, indicates that the setgrent_r routine
@@ -4825,8 +4950,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
* is defined.
*/
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
+/*#define HAS_SETGRENT_R / **/
+#define SETGRENT_R_PROTO 0 /**/
/* HAS_SETHOSTENT_R:
* This symbol, if defined, indicates that the sethostent_r routine
@@ -4838,8 +4963,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
* is defined.
*/
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
+/*#define HAS_SETHOSTENT_R / **/
+#define SETHOSTENT_R_PROTO 0 /**/
/* HAS_SETLOCALE_R:
* This symbol, if defined, indicates that the setlocale_r routine
@@ -4851,8 +4976,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
* is defined.
*/
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
+/*#define HAS_SETLOCALE_R / **/
+#define SETLOCALE_R_PROTO 0 /**/
/* HAS_SETNETENT_R:
* This symbol, if defined, indicates that the setnetent_r routine
@@ -4864,8 +4989,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
* is defined.
*/
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
+/*#define HAS_SETNETENT_R / **/
+#define SETNETENT_R_PROTO 0 /**/
/* HAS_SETPROTOENT_R:
* This symbol, if defined, indicates that the setprotoent_r routine
@@ -4877,8 +5002,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
* is defined.
*/
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
+/*#define HAS_SETPROTOENT_R / **/
+#define SETPROTOENT_R_PROTO 0 /**/
/* HAS_SETPWENT_R:
* This symbol, if defined, indicates that the setpwent_r routine
@@ -4890,8 +5015,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
* is defined.
*/
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
+/*#define HAS_SETPWENT_R / **/
+#define SETPWENT_R_PROTO 0 /**/
/* HAS_SETSERVENT_R:
* This symbol, if defined, indicates that the setservent_r routine
@@ -4903,8 +5028,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
* is defined.
*/
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
+/*#define HAS_SETSERVENT_R / **/
+#define SETSERVENT_R_PROTO 0 /**/
/* HAS_SRAND48_R:
* This symbol, if defined, indicates that the srand48_r routine
@@ -4916,8 +5041,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
* is defined.
*/
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
+/*#define HAS_SRAND48_R / **/
+#define SRAND48_R_PROTO 0 /**/
/* HAS_SRANDOM_R:
* This symbol, if defined, indicates that the srandom_r routine
@@ -4929,8 +5054,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
* is defined.
*/
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
+/*#define HAS_SRANDOM_R / **/
+#define SRANDOM_R_PROTO 0 /**/
/* HAS_STRERROR_R:
* This symbol, if defined, indicates that the strerror_r routine
@@ -4942,8 +5067,20 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
* is defined.
*/
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
+/*#define HAS_STRERROR_R / **/
+#define STRERROR_R_PROTO 0 /**/
+
+/* HAS_STRTOD_L:
+ * This symbol, if defined, indicates that the strtod_l routine is
+ * available to convert strings to long doubles.
+ */
+/*#define HAS_STRTOD_L / **/
+
+/* HAS_STRTOLD_L:
+ * This symbol, if defined, indicates that the strtold_l routine is
+ * available to convert strings to long doubles.
+ */
+/*#define HAS_STRTOLD_L / **/
/* HAS_TMPNAM_R:
* This symbol, if defined, indicates that the tmpnam_r routine
@@ -4955,8 +5092,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
* is defined.
*/
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
+/*#define HAS_TMPNAM_R / **/
+#define TMPNAM_R_PROTO 0 /**/
/* HAS_TTYNAME_R:
* This symbol, if defined, indicates that the ttyname_r routine
@@ -4968,18 +5105,24 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
* is defined.
*/
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
+/*#define HAS_TTYNAME_R / **/
+#define TTYNAME_R_PROTO 0 /**/
+
+/* HAS_WCRTOMB:
+ * This symbol, if defined, indicates that the wcrtomb routine is
+ * available to convert a wide character into a multi-byte character.
+ */
+/*#define HAS_WCRTOMB / **/
/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mach/cthreads.h>.
*/
/*#define I_MACH_CTHREADS / **/
/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pthread.h>.
*/
/*#define I_PTHREAD / **/
@@ -5021,7 +5164,7 @@
/* HAS_TIMES:
* This symbol, if defined, indicates that the times() routine exists.
* Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
+ * use getrusage(). It may be necessary to include <sys/times.h>.
*/
#define HAS_TIMES /**/
@@ -5090,7 +5233,7 @@
/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
*/
-#define Size_t_size 4 /**/
+#define Size_t_size 8 /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 62addd119a..4b88f66938 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -9,8 +9,8 @@
/* Package name : perl5
* Source directory :
- * Configuration time: Tue Oct 17 08:29:51 2017
- * Configured by : shay
+ * Configuration time: Wed Oct 7 16:25:12 2020
+ * Configured by : tony
* Target system :
*/
@@ -216,7 +216,7 @@
* This symbol, if defined, indicates that the lstat routine is
* available to do file stats on symbolic links.
*/
-/*#define HAS_LSTAT / **/
+#define HAS_LSTAT /**/
/* HAS_MBLEN:
* This symbol, if defined, indicates that the mblen routine is available
@@ -257,6 +257,12 @@
*/
#define HAS_MKTIME /**/
+/* HAS_MSG:
+ * This symbol, if defined, indicates that the entire msg*(2) library is
+ * supported (IPC mechanism based on message queues).
+ */
+/*#define HAS_MSG / **/
+
/* HAS_MSYNC:
* This symbol, if defined, indicates that the msync system call is
* available to synchronize a mapped file.
@@ -366,6 +372,12 @@
*/
#define HAS_SELECT /**/
+/* HAS_SEM:
+ * This symbol, if defined, indicates that the entire sem*(2) library is
+ * supported.
+ */
+/*#define HAS_SEM / **/
+
/* HAS_SETEGID:
* This symbol, if defined, indicates that the setegid routine is available
* to change the effective gid of the current program.
@@ -392,12 +404,6 @@
*/
/*#define HAS_SETLINEBUF / **/
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
/* HAS_SETPGID:
* This symbol, if defined, indicates that the setpgid(pid, gpid)
* routine is available to set process group ID.
@@ -796,14 +802,14 @@
/*#define HAS_EACCESS / **/
/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/access.h>.
*/
/*#define I_SYS_ACCESS / **/
/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/security.h>.
*/
/*#define I_SYS_SECURITY / **/
@@ -811,7 +817,7 @@
* This symbol contains the number of bytes required to align a
* double, or a long double when applicable. Usual values are 2,
* 4 and 8. The default is eight, for safety. For cross-compiling
- * or multiarch support, Configure will set a minimum of 8.
+ * or multiarch support, Configure will set a minimum of 8.
*/
#define MEM_ALIGNBYTES 8
@@ -843,7 +849,7 @@
# endif
# endif
#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
+#define BYTEORDER 0x12345678 /* large digits for MSB */
#endif
/* CHARBITS:
@@ -914,7 +920,7 @@
* the GNU C library is being used. A better check is to use
* the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
*/
-/*#define HAS_GNULIBC / **/
+/*#define HAS_GNULIBC / **/
#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
#endif
@@ -1066,12 +1072,12 @@
* This symbol is defined if using the FILE_ptr macro as an lvalue
* to increase the pointer by n leaves File_cnt(fp) unchanged.
*/
-#define USE_STDIO_PTR /**/
+#define USE_STDIO_PTR /**/
#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
+#define FILE_ptr(fp) PERLIO_FILE_ptr(fp)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) PERLIO_FILE_cnt(fp)
+#define STDIO_CNT_LVALUE /**/
/*#define STDIO_PTR_LVAL_SETS_CNT / **/
#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
#endif
@@ -1096,10 +1102,10 @@
* structure pointed to its argument. This macro will always be defined
* if USE_STDIO_BASE is defined.
*/
-#define USE_STDIO_BASE /**/
+#define USE_STDIO_BASE /**/
#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
+#define FILE_base(fp) PERLIO_FILE_base(fp)
+#define FILE_bufsiz(fp) (PERLIO_FILE_cnt(fp) + PERLIO_FILE_ptr(fp) - PERLIO_FILE_base(fp))
#endif
/* DOUBLESIZE:
@@ -1109,8 +1115,8 @@
#define DOUBLESIZE 8 /**/
/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
+ * This symbol is always defined, and indicates to the C program that
+ * it should include <time.h>.
*/
/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
@@ -1167,7 +1173,7 @@
* the compiler supports (void *); otherwise it will be
* sizeof(char *).
*/
-#define PTRSIZE 4 /**/
+#define PTRSIZE 8 /**/
/* Drand01:
* This macro is to be used to generate uniformly distributed
@@ -1202,13 +1208,13 @@
* to get any typedef'ed information.
* We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
*/
-#define SSize_t int /* signed count of bytes */
+#define SSize_t __int64 /* signed count of bytes */
/* EBCDIC:
* This symbol, if defined, indicates that this system uses
* EBCDIC encoding.
*/
-/*#define EBCDIC / **/
+/*#define EBCDIC / **/
/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
@@ -1240,7 +1246,7 @@
*/
#define BIN "c:\\perl\\bin" /**/
#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
+#define PERL_RELOCATABLE_INC "undef" /**/
/* PERL_INC_VERSION_LIST:
* This variable specifies the list of subdirectories in over
@@ -1253,7 +1259,7 @@
/* INSTALL_USR_BIN_PERL:
* This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
+ * also as /usr/bin/perl.
*/
/*#define INSTALL_USR_BIN_PERL / **/
@@ -1363,7 +1369,7 @@
* feature tests from Configure are generally more reliable.
*/
#define OSNAME "MSWin32" /**/
-#define OSVERS "6.1" /**/
+#define OSVERS "10.0.18363.1082" /**/
/* CAT2:
* This macro concatenates 2 tokens together.
@@ -1389,7 +1395,7 @@
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
+ * output. Typical value of "cc -E" or "/lib/cpp", but it can also
* call a wrapper. See CPPRUN.
*/
/* CPPMINUS:
@@ -1450,6 +1456,10 @@
/* HASATTRIBUTE_WARN_UNUSED_RESULT:
* Can we handle GCC attribute for warning on unused results
*/
+/* HASATTRIBUTE_ALWAYS_INLINE:
+ * Can we handle GCC attribute for functions that should always be
+ * inlined.
+ */
/*#define HASATTRIBUTE_DEPRECATED / **/
/*#define HASATTRIBUTE_FORMAT / **/
/*#define PRINTF_FORMAT_NULL_OK / **/
@@ -1459,6 +1469,7 @@
/*#define HASATTRIBUTE_PURE / **/
/*#define HASATTRIBUTE_UNUSED / **/
/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
+/*#define HASATTRIBUTE_ALWAYS_INLINE / **/
/* HAS_BACKTRACE:
* This symbol, if defined, indicates that the backtrace() routine is
@@ -1721,6 +1732,8 @@
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE
* LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN
* LONG_DOUBLE_IS_VAX_H_FLOAT
* LONG_DOUBLE_IS_UNKNOWN_FORMAT
* It is only defined if the system supports long doubles.
@@ -1806,18 +1819,6 @@
/*#define HAS_MMAP / **/
#define Mmap_t void * /**/
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
/* HAS_SETGRENT:
* This symbol, if defined, indicates that the setgrent routine is
* available for initializing sequential access of the group database.
@@ -1910,6 +1911,10 @@
* This symbol, if defined, indicates the availability of
* struct sockaddr_in6;
*/
+/* HAS_SOCKADDR_STORAGE:
+ * This symbol, if defined, indicates the availability of
+ * struct sockaddr_storage;
+ */
/* HAS_SIN6_SCOPE_ID:
* This symbol, if defined, indicates that the struct sockaddr_in6
* structure has a member called sin6_scope_id.
@@ -1934,6 +1939,7 @@
/*#define HAS_SOCKETPAIR / **/
/*#define HAS_SOCKADDR_SA_LEN / **/
/*#define HAS_SOCKADDR_IN6 / **/
+#define HAS_SOCKADDR_STORAGE /**/
#define HAS_SIN6_SCOPE_ID /**/
/*#define HAS_IP_MREQ / **/
/*#define HAS_IP_MREQ_SOURCE / **/
@@ -1945,7 +1951,7 @@
* st_blksize and st_blocks.
*/
#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
+/*#define USE_STAT_BLOCKS / **/
#endif
/* HAS_SYS_ERRLIST:
@@ -1965,11 +1971,11 @@
* This symbol, if defined, indicates that the union semun is
* defined by including <sys/sem.h>. If not, the user code
* probably needs to define it as:
- * union semun {
+ * union semun {
* int val;
* struct semid_ds *buf;
* unsigned short *array;
- * }
+ * }
*/
/* USE_SEMCTL_SEMUN:
* This symbol, if defined, indicates that union semun is
@@ -2164,7 +2170,7 @@
/* Free_t:
* This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+ * void, but occasionally int.
*/
/* Malloc_t:
* This symbol is the type of pointer returned by malloc and realloc.
@@ -2260,7 +2266,7 @@
* This symbol, if defined, indicates that the atoll routine is
* available to convert strings into long longs.
*/
-/*#define HAS_ATOLL / **/
+#define HAS_ATOLL /**/
/* HAS__FWALK:
* This symbol, if defined, indicates that the _fwalk system call is
@@ -2268,6 +2274,12 @@
*/
/*#define HAS__FWALK / **/
+/* HAS_ACCEPT4:
+ * This symbol, if defined, indicates that the accept4 routine is
+ * available to accept socket connections.
+ */
+/*#define HAS_ACCEPT4 / **/
+
/* HAS_ACOSH:
* This symbol, if defined, indicates that the acosh routine is
* available to do the inverse hyperbolic cosine function.
@@ -2302,6 +2314,22 @@
/*#define HAS_BUILTIN_EXPECT / **/
/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
+/* HAS_BUILTIN_ADD_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_add_overflow for adding integers with overflow checks.
+ */
+/* HAS_BUILTIN_SUB_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_sub_overflow for subtracting integers with overflow checks.
+ */
+/* HAS_BUILTIN_MUL_OVERFLOW:
+ * This symbol, if defined, indicates that the compiler supports
+ * __builtin_mul_overflow for multiplying integers with overflow checks.
+ */
+/*#define HAS_BUILTIN_ADD_OVERFLOW / **/
+/*#define HAS_BUILTIN_SUB_OVERFLOW / **/
+/*#define HAS_BUILTIN_MUL_OVERFLOW / **/
+
/* HAS_C99_VARIADIC_MACROS:
* If defined, the compiler supports C99 variadic macros.
*/
@@ -2381,7 +2409,13 @@
* makes sense if you *have* dlsym, which we will presume is the
* case if you're using dl_dlopen.xs.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
+/*#define DLSYM_NEEDS_UNDERSCORE / **/
+
+/* HAS_DUP3:
+ * This symbol, if defined, indicates that the dup3 routine is
+ * available to duplicate file descriptors.
+ */
+/*#define HAS_DUP3 / **/
/* HAS_ERF:
* This symbol, if defined, indicates that the erf routine is
@@ -2533,22 +2567,22 @@
* available to classify doubles. Available for example in HP-UX.
* The returned values are defined in <math.h> and are
*
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
+ * FP_NORMAL Normalized
+ * FP_ZERO Zero
+ * FP_INFINITE Infinity
+ * FP_SUBNORMAL Denormalized
+ * FP_NAN NaN
*
*/
/* HAS_FP_CLASSIFY:
* This symbol, if defined, indicates that the fp_classify routine is
* available to classify doubles. The values are defined in <math.h>
*
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
+ * FP_NORMAL Normalized
+ * FP_ZERO Zero
+ * FP_INFINITE Infinity
+ * FP_SUBNORMAL Denormalized
+ * FP_NAN NaN
*
*/
/*#define HAS_FPCLASSIFY / **/
@@ -2581,7 +2615,7 @@
/* HAS_FPOS64_T:
* This symbol will be defined if the C compiler supports fpos64_t.
*/
-/*#define HAS_FPOS64_T / **/
+/*#define HAS_FPOS64_T / **/
/* HAS_FREXPL:
* This symbol, if defined, indicates that the frexpl routine is
@@ -2752,8 +2786,8 @@
/*#define HAS_INETPTON / **/
/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
+ * This symbol will defined if the C compiler supports int64_t.
+ * Usually the <inttypes.h> needs to be included, but sometimes
* <sys/types.h> is enough.
*/
/*#define HAS_INT64_T / **/
@@ -2838,7 +2872,7 @@
* of significant digits in a long double precision number. Unlike
* for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
*/
-#define HAS_LDBL_DIG /**/
+#define HAS_LDBL_DIG /**/
/* HAS_LGAMMA:
* This symbol, if defined, indicates that the lgamma routine is
@@ -2954,6 +2988,9 @@
* This symbol, if defined, indicates that the memmem routine is
* available to return a pointer to the start of the first occurrence
* of a substring in a memory area (or NULL if not found).
+ * In glibc, memmem is a GNU extension. The function is visible in
+ * libc, but the prototype is only visible if _GNU_SOURCE is #defined.
+ * Thus we only define this if both the prototype and symbol are found.
*/
/*#define HAS_MEMMEM / **/
@@ -2970,6 +3007,13 @@
*/
/*#define HAS_MKDTEMP / **/
+/* HAS_MKOSTEMP:
+ * This symbol, if defined, indicates that the mkostemp routine is
+ * available to exclusively create and open a uniquely named (with a
+ * suffix) temporary file.
+ */
+/*#define HAS_MKOSTEMP / **/
+
/* HAS_MKSTEMPS:
* This symbol, if defined, indicates that the mkstemps routine is
* available to exclusively create and open a uniquely named
@@ -3008,6 +3052,12 @@
*/
/*#define HAS_NAN / **/
+/* HAS_NANOSLEEP:
+ * This symbol, if defined, indicates that the nanosleep
+ * system call is available to sleep with 1E-9 sec accuracy.
+ */
+/*#define HAS_NANOSLEEP / **/
+
/* HAS_NEARBYINT:
* This symbol, if defined, indicates that the nearbyint routine is
* available to return the integral value closest to (according to
@@ -3028,6 +3078,10 @@
* This symbol, if defined, indicates that the uselocale routine is
* available to set the current locale for the calling thread.
*/
+/* HAS_DUPLOCALE:
+ * This symbol, if defined, indicates that the duplocale routine is
+ * available to duplicate a locale object.
+ */
/* HAS_QUERYLOCALE:
* This symbol, if defined, indicates that the querylocale routine is
* available to return the name of the locale for a category mask.
@@ -3039,6 +3093,7 @@
/*#define HAS_NEWLOCALE / **/
/*#define HAS_FREELOCALE / **/
/*#define HAS_USELOCALE / **/
+/*#define HAS_DUPLOCALE / **/
/*#define HAS_QUERYLOCALE / **/
/*#define I_XLOCALE / **/
@@ -3066,7 +3121,13 @@
/* HAS_OFF64_T:
* This symbol will be defined if the C compiler supports off64_t.
*/
-/*#define HAS_OFF64_T / **/
+/*#define HAS_OFF64_T / **/
+
+/* HAS_PIPE2:
+ * This symbol, if defined, indicates that the pipe2 routine is
+ * available to create an inter-process channel.
+ */
+/*#define HAS_PIPE2 / **/
/* HAS_PRCTL:
* This symbol, if defined, indicates that the prctl routine is
@@ -3105,7 +3166,7 @@
/* HAS_PTRDIFF_T:
* This symbol will be defined if the C compiler supports ptrdiff_t.
*/
-#define HAS_PTRDIFF_T /**/
+#define HAS_PTRDIFF_T /**/
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
@@ -3179,6 +3240,17 @@
*/
/*#define HAS_SETITIMER / **/
+/* HAS_SETLOCALE:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available to handle locale-specific ctype implementations.
+ */
+/* SETLOCALE_ACCEPTS_ANY_LOCALE_NAME:
+ * This symbol, if defined, indicates that the setlocale routine is
+ * available and it accepts any input locale name as valid.
+ */
+#define HAS_SETLOCALE /**/
+/*#define SETLOCALE_ACCEPTS_ANY_LOCALE_NAME / **/
+
/* HAS_SETPROCTITLE:
* This symbol, if defined, indicates that the setproctitle routine is
* available to set process title.
@@ -3311,6 +3383,12 @@
*/
/*#define HAS_STRLCPY / **/
+/* HAS_STRNLEN:
+ * This symbol, if defined, indicates that the strnlen () routine is
+ * available to check the length of a string up to a maximum.
+ */
+/*#define HAS_STRNLEN / **/
+
/* HAS_STRTOLD:
* This symbol, if defined, indicates that the strtold routine is
* available to convert strings to long doubles.
@@ -3321,7 +3399,7 @@
* This symbol, if defined, indicates that the strtoll routine is
* available to convert strings to long longs.
*/
-/*#define HAS_STRTOLL / **/
+#define HAS_STRTOLL /**/
/* HAS_STRTOQ:
* This symbol, if defined, indicates that the strtoq routine is
@@ -3333,7 +3411,7 @@
* This symbol, if defined, indicates that the strtoull routine is
* available to convert strings to unsigned long longs.
*/
-/*#define HAS_STRTOULL / **/
+#define HAS_STRTOULL /**/
/* HAS_STRTOUQ:
* This symbol, if defined, indicates that the strtouq routine is
@@ -3401,6 +3479,18 @@
*/
/*#define HAS_TIMEGM / **/
+/* HAS_TOWLOWER:
+ * This symbol, if defined, indicates that the towlower () routine is
+ * available to do case conversion.
+ */
+/*#define HAS_TOWLOWER / **/
+
+/* HAS_TOWUPPER:
+ * This symbol, if defined, indicates that the towupper () routine is
+ * available to do case conversion.
+ */
+/*#define HAS_TOWUPPER / **/
+
/* HAS_TRUNC:
* This symbol, if defined, indicates that the trunc routine is
* available to round doubles towards zero.
@@ -3478,6 +3568,12 @@
*/
#define DEFAULT_INC_EXCLUDES_DOT /**/
+/* USE_STRICT_BY_DEFAULT
+ * This symbol, if defined, enables additional defaults.
+ * At this time it only enables implicit strict by default.
+ */
+/*#define USE_STRICT_BY_DEFAULT / * use strict by default */
+
/* USE_DYNAMIC_LOADING:
* This symbol, if defined, indicates that dynamic loading of
* some sort is available.
@@ -3497,8 +3593,8 @@
* Note that if fflushNULL is defined, fflushall will not
* even be probed for and will be left undefined.
*/
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
+#define FFLUSH_NULL /**/
+/*#define FFLUSH_ALL / **/
/* I_BFD:
* This symbol, if defined, indicates that <bfd.h> exists and
@@ -3537,10 +3633,10 @@
* For DB version 1 this is always 0.
*/
#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
+#define DB_Prefix_t int /**/
+#define DB_VERSION_MAJOR_CFG 0 /**/
+#define DB_VERSION_MINOR_CFG 0 /**/
+#define DB_VERSION_PATCH_CFG 0 /**/
/* I_FENV:
* This symbol, if defined, indicates to the C program that it should
@@ -3567,8 +3663,8 @@
/*#define I_IEEEFP / **/
/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <inttypes.h>.
*/
/*#define I_INTTYPES / **/
@@ -3597,8 +3693,8 @@
/*#define I_MNTENT / **/
/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <netinet/tcp.h>.
*/
/*#define I_NETINET_TCP / **/
@@ -3636,13 +3732,13 @@
* This symbol, if defined, indicates that <stdbool.h> exists and
* can be included.
*/
-/*#define I_STDBOOL / **/
+#define I_STDBOOL /**/
/* I_STDINT:
* This symbol, if defined, indicates that <stdint.h> exists and
* should be included.
*/
-/*#define I_STDINT / **/
+#define I_STDINT /**/
/* I_SUNMATH:
* This symbol, if defined, indicates that <sunmath.h> exists and
@@ -3697,6 +3793,17 @@
*/
/*#define I_USTAT / **/
+/* I_WCHAR:
+ * This symbol, if defined, indicates to the C program that <wchar.h>
+ * is available for inclusion
+ */
+/*#define I_WCHAR / **/
+
+/* I_WCTYPE:
+ * This symbol, if defined, indicates that <wctype.h> exists.
+ */
+/*#define I_WCTYPE / **/
+
/* DOUBLEINFBYTES:
* This symbol, if defined, is a comma-separated list of
* hexadecimal bytes for the double precision infinity.
@@ -3937,8 +4044,8 @@
* This symbol, if defined, indicates that a variable of type NVTYPE
* stores 0.0 in memory as all bits zero.
*/
-#define IVTYPE long /**/
-#define UVTYPE unsigned long /**/
+#define IVTYPE __int64 /**/
+#define UVTYPE unsigned __int64 /**/
#define I8TYPE char /**/
#define U8TYPE unsigned char /**/
#define I16TYPE short /**/
@@ -3950,8 +4057,8 @@
#define U64TYPE unsigned __int64 /**/
#endif
#define NVTYPE double /**/
-#define IVSIZE 4 /**/
-#define UVSIZE 4 /**/
+#define IVSIZE 8 /**/
+#define UVSIZE 8 /**/
#define I8SIZE 1 /**/
#define U8SIZE 1 /**/
#define I16SIZE 2 /**/
@@ -3963,9 +4070,9 @@
#define U64SIZE 8 /**/
#endif
#define NVSIZE 8 /**/
-#define NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 32
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
+#undef NV_PRESERVES_UV
+#define NV_PRESERVES_UV_BITS 53
+#define NV_OVERFLOWS_INTEGERS_AT (256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0)
#define NV_ZERO_IS_ALLBITS_ZERO
#if UVSIZE == 8
# ifdef BYTEORDER
@@ -4013,11 +4120,11 @@
* This symbol defines the format string used for printing a Perl NV
* using %g-ish floating point format.
*/
-#define IVdf "ld" /**/
-#define UVuf "lu" /**/
-#define UVof "lo" /**/
-#define UVxf "lx" /**/
-#define UVXf "lX" /**/
+#define IVdf "I64d" /**/
+#define UVuf "I64u" /**/
+#define UVof "I64o" /**/
+#define UVxf "I64x" /**/
+#define UVXf "I64X" /**/
#define NVef "e" /**/
#define NVff "f" /**/
#define NVgf "g" /**/
@@ -4029,7 +4136,7 @@
* is either n or 32*ceil(n/32), especially many little-endians do
* the latter. This is only useful if you have select(), naturally.
*/
-#define SELECT_MIN_BITS 32 /**/
+#define SELECT_MIN_BITS 32 /**/
/* ST_INO_SIZE:
* This variable contains the size of struct stat's st_ino in bytes.
@@ -4039,7 +4146,7 @@
* 1 for unsigned, -1 for signed.
*/
#define ST_INO_SIGN 1 /* st_ino sign */
-#define ST_INO_SIZE 4 /* st_ino size */
+#define ST_INO_SIZE 8 /* st_ino size */
/* STARTPERL:
* This variable contains the string to put in front of a perl
@@ -4077,9 +4184,9 @@
* This symbol contains the minimum value for the time_t offset that
* the system function localtime () accepts, and defaults to 0
*/
-#define GMTIME_MAX 2147483647 /**/
+#define GMTIME_MAX 32535291599 /**/
#define GMTIME_MIN 0 /**/
-#define LOCALTIME_MAX 2147483647 /**/
+#define LOCALTIME_MAX 32535244799 /**/
#define LOCALTIME_MIN 0 /**/
/* USE_64_BIT_INT:
@@ -4101,7 +4208,7 @@
* you may need at least to reboot your OS to 64-bit mode.
*/
#ifndef USE_64_BIT_INT
-/*#define USE_64_BIT_INT / **/
+#define USE_64_BIT_INT /**/
#endif
#ifndef USE_64_BIT_ALL
/*#define USE_64_BIT_ALL / **/
@@ -4131,7 +4238,7 @@
/* USE_KERN_PROC_PATHNAME:
* This symbol, if defined, indicates that we can use sysctl with
* KERN_PROC_PATHNAME to get a full path for the executable, and hence
- * convert $^X to an absolute path.
+ * convert $^X to an absolute path.
*/
/*#define USE_KERN_PROC_PATHNAME / **/
@@ -4274,7 +4381,7 @@
* is defined, and 'int *' otherwise. This is only useful if you
* have select(), of course.
*/
-#define Select_fd_set_t Perl_fd_set * /**/
+#define Select_fd_set_t Perl_fd_set * /**/
/* Sock_size_t:
* This symbol holds the type used for the size argument of
@@ -4288,7 +4395,7 @@
* where library files may be held under a private library, for
* instance.
*/
-#define ARCHNAME "MSWin32-x86-perlio" /**/
+#define ARCHNAME "MSWin32-x64-perlio" /**/
/* HAS_ASCTIME_R:
* This symbol, if defined, indicates that the asctime_r routine
@@ -4300,8 +4407,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
* is defined.
*/
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
+/*#define HAS_ASCTIME_R / **/
+#define ASCTIME_R_PROTO 0 /**/
/* HAS_CRYPT_R:
* This symbol, if defined, indicates that the crypt_r routine
@@ -4313,8 +4420,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
* is defined.
*/
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
+/*#define HAS_CRYPT_R / **/
+#define CRYPT_R_PROTO 0 /**/
/* HAS_CTERMID_R:
* This symbol, if defined, indicates that the ctermid_r routine
@@ -4326,8 +4433,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
* is defined.
*/
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
+/*#define HAS_CTERMID_R / **/
+#define CTERMID_R_PROTO 0 /**/
/* HAS_CTIME_R:
* This symbol, if defined, indicates that the ctime_r routine
@@ -4339,8 +4446,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
* is defined.
*/
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
+/*#define HAS_CTIME_R / **/
+#define CTIME_R_PROTO 0 /**/
/* HAS_DRAND48_R:
* This symbol, if defined, indicates that the drand48_r routine
@@ -4352,8 +4459,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
* is defined.
*/
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
+/*#define HAS_DRAND48_R / **/
+#define DRAND48_R_PROTO 0 /**/
/* HAS_ENDGRENT_R:
* This symbol, if defined, indicates that the endgrent_r routine
@@ -4365,8 +4472,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
* is defined.
*/
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
+/*#define HAS_ENDGRENT_R / **/
+#define ENDGRENT_R_PROTO 0 /**/
/* HAS_ENDHOSTENT_R:
* This symbol, if defined, indicates that the endhostent_r routine
@@ -4378,8 +4485,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
* is defined.
*/
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
+/*#define HAS_ENDHOSTENT_R / **/
+#define ENDHOSTENT_R_PROTO 0 /**/
/* HAS_ENDNETENT_R:
* This symbol, if defined, indicates that the endnetent_r routine
@@ -4391,8 +4498,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
* is defined.
*/
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
+/*#define HAS_ENDNETENT_R / **/
+#define ENDNETENT_R_PROTO 0 /**/
/* HAS_ENDPROTOENT_R:
* This symbol, if defined, indicates that the endprotoent_r routine
@@ -4404,8 +4511,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
* is defined.
*/
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
+/*#define HAS_ENDPROTOENT_R / **/
+#define ENDPROTOENT_R_PROTO 0 /**/
/* HAS_ENDPWENT_R:
* This symbol, if defined, indicates that the endpwent_r routine
@@ -4417,8 +4524,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
* is defined.
*/
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
+/*#define HAS_ENDPWENT_R / **/
+#define ENDPWENT_R_PROTO 0 /**/
/* HAS_ENDSERVENT_R:
* This symbol, if defined, indicates that the endservent_r routine
@@ -4430,8 +4537,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
* is defined.
*/
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
+/*#define HAS_ENDSERVENT_R / **/
+#define ENDSERVENT_R_PROTO 0 /**/
/* HAS_GETGRENT_R:
* This symbol, if defined, indicates that the getgrent_r routine
@@ -4443,8 +4550,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
* is defined.
*/
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
+/*#define HAS_GETGRENT_R / **/
+#define GETGRENT_R_PROTO 0 /**/
/* HAS_GETGRGID_R:
* This symbol, if defined, indicates that the getgrgid_r routine
@@ -4456,8 +4563,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
* is defined.
*/
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
+/*#define HAS_GETGRGID_R / **/
+#define GETGRGID_R_PROTO 0 /**/
/* HAS_GETGRNAM_R:
* This symbol, if defined, indicates that the getgrnam_r routine
@@ -4469,8 +4576,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
* is defined.
*/
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
+/*#define HAS_GETGRNAM_R / **/
+#define GETGRNAM_R_PROTO 0 /**/
/* HAS_GETHOSTBYADDR_R:
* This symbol, if defined, indicates that the gethostbyaddr_r routine
@@ -4482,8 +4589,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
* is defined.
*/
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
+/*#define HAS_GETHOSTBYADDR_R / **/
+#define GETHOSTBYADDR_R_PROTO 0 /**/
/* HAS_GETHOSTBYNAME_R:
* This symbol, if defined, indicates that the gethostbyname_r routine
@@ -4495,8 +4602,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
* is defined.
*/
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETHOSTBYNAME_R / **/
+#define GETHOSTBYNAME_R_PROTO 0 /**/
/* HAS_GETHOSTENT_R:
* This symbol, if defined, indicates that the gethostent_r routine
@@ -4508,8 +4615,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
* is defined.
*/
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
+/*#define HAS_GETHOSTENT_R / **/
+#define GETHOSTENT_R_PROTO 0 /**/
/* HAS_GETLOGIN_R:
* This symbol, if defined, indicates that the getlogin_r routine
@@ -4521,8 +4628,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
* is defined.
*/
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
+/*#define HAS_GETLOGIN_R / **/
+#define GETLOGIN_R_PROTO 0 /**/
/* HAS_GETNETBYADDR_R:
* This symbol, if defined, indicates that the getnetbyaddr_r routine
@@ -4534,8 +4641,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
* is defined.
*/
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
+/*#define HAS_GETNETBYADDR_R / **/
+#define GETNETBYADDR_R_PROTO 0 /**/
/* HAS_GETNETBYNAME_R:
* This symbol, if defined, indicates that the getnetbyname_r routine
@@ -4547,8 +4654,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
* is defined.
*/
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETNETBYNAME_R / **/
+#define GETNETBYNAME_R_PROTO 0 /**/
/* HAS_GETNETENT_R:
* This symbol, if defined, indicates that the getnetent_r routine
@@ -4560,8 +4667,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
* is defined.
*/
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
+/*#define HAS_GETNETENT_R / **/
+#define GETNETENT_R_PROTO 0 /**/
/* HAS_GETPROTOBYNAME_R:
* This symbol, if defined, indicates that the getprotobyname_r routine
@@ -4573,8 +4680,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
* is defined.
*/
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETPROTOBYNAME_R / **/
+#define GETPROTOBYNAME_R_PROTO 0 /**/
/* HAS_GETPROTOBYNUMBER_R:
* This symbol, if defined, indicates that the getprotobynumber_r routine
@@ -4586,8 +4693,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
* is defined.
*/
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
+/*#define HAS_GETPROTOBYNUMBER_R / **/
+#define GETPROTOBYNUMBER_R_PROTO 0 /**/
/* HAS_GETPROTOENT_R:
* This symbol, if defined, indicates that the getprotoent_r routine
@@ -4599,8 +4706,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
* is defined.
*/
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
+/*#define HAS_GETPROTOENT_R / **/
+#define GETPROTOENT_R_PROTO 0 /**/
/* HAS_GETPWENT_R:
* This symbol, if defined, indicates that the getpwent_r routine
@@ -4612,8 +4719,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
* is defined.
*/
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
+/*#define HAS_GETPWENT_R / **/
+#define GETPWENT_R_PROTO 0 /**/
/* HAS_GETPWNAM_R:
* This symbol, if defined, indicates that the getpwnam_r routine
@@ -4625,8 +4732,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
* is defined.
*/
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
+/*#define HAS_GETPWNAM_R / **/
+#define GETPWNAM_R_PROTO 0 /**/
/* HAS_GETPWUID_R:
* This symbol, if defined, indicates that the getpwuid_r routine
@@ -4638,8 +4745,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
* is defined.
*/
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
+/*#define HAS_GETPWUID_R / **/
+#define GETPWUID_R_PROTO 0 /**/
/* HAS_GETSERVBYNAME_R:
* This symbol, if defined, indicates that the getservbyname_r routine
@@ -4651,8 +4758,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
* is defined.
*/
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
+/*#define HAS_GETSERVBYNAME_R / **/
+#define GETSERVBYNAME_R_PROTO 0 /**/
/* HAS_GETSERVBYPORT_R:
* This symbol, if defined, indicates that the getservbyport_r routine
@@ -4664,8 +4771,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
* is defined.
*/
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
+/*#define HAS_GETSERVBYPORT_R / **/
+#define GETSERVBYPORT_R_PROTO 0 /**/
/* HAS_GETSERVENT_R:
* This symbol, if defined, indicates that the getservent_r routine
@@ -4677,8 +4784,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
* is defined.
*/
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
+/*#define HAS_GETSERVENT_R / **/
+#define GETSERVENT_R_PROTO 0 /**/
/* HAS_GETSPNAM_R:
* This symbol, if defined, indicates that the getspnam_r routine
@@ -4690,8 +4797,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
* is defined.
*/
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
+/*#define HAS_GETSPNAM_R / **/
+#define GETSPNAM_R_PROTO 0 /**/
/* HAS_GMTIME_R:
* This symbol, if defined, indicates that the gmtime_r routine
@@ -4703,8 +4810,14 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
* is defined.
*/
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
+/*#define HAS_GMTIME_R / **/
+#define GMTIME_R_PROTO 0 /**/
+
+/* HAS_LOCALECONV_L:
+ * This symbol, if defined, indicates that the localeconv_l routine is
+ * available to query certain information about a locale.
+ */
+/*#define HAS_LOCALECONV_L / **/
/* HAS_LOCALTIME_R:
* This symbol, if defined, indicates that the localtime_r routine
@@ -4723,14 +4836,35 @@
#define L_R_TZSET
#endif
+/* L_R_TZSET:
+ * If localtime_r() needs tzset, it is defined in this define
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
* is defined.
*/
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
+/*#define HAS_LOCALTIME_R / **/
+#define LOCALTIME_R_PROTO 0 /**/
+
+/* HAS_MBRLEN:
+ * This symbol, if defined, indicates that the mbrlen routine is
+ * available to get the length of multi-byte character strings.
+ */
+/*#define HAS_MBRLEN / **/
+
+/* HAS_MBRTOWC:
+ * This symbol, if defined, indicates that the mbrtowc routine is
+ * available to convert a multi-byte character into a wide character.
+ */
+/*#define HAS_MBRTOWC / **/
+
+/* HAS_THREAD_SAFE_NL_LANGINFO_L:
+ * This symbol, when defined, indicates presence of the nl_langinfo_l()
+ * function, and that it is thread-safe.
+ */
+/*#define HAS_THREAD_SAFE_NL_LANGINFO_L / **/
/* OLD_PTHREAD_CREATE_JOINABLE:
* This symbol, if defined, indicates how to create pthread
@@ -4777,8 +4911,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
* is defined.
*/
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
+/*#define HAS_RANDOM_R / **/
+#define RANDOM_R_PROTO 0 /**/
/* HAS_READDIR64_R:
* This symbol, if defined, indicates that the readdir64_r routine
@@ -4790,8 +4924,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
* is defined.
*/
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
+/*#define HAS_READDIR64_R / **/
+#define READDIR64_R_PROTO 0 /**/
/* HAS_READDIR_R:
* This symbol, if defined, indicates that the readdir_r routine
@@ -4803,8 +4937,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
* is defined.
*/
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
+/*#define HAS_READDIR_R / **/
+#define READDIR_R_PROTO 0 /**/
/* HAS_SETGRENT_R:
* This symbol, if defined, indicates that the setgrent_r routine
@@ -4816,8 +4950,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
* is defined.
*/
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
+/*#define HAS_SETGRENT_R / **/
+#define SETGRENT_R_PROTO 0 /**/
/* HAS_SETHOSTENT_R:
* This symbol, if defined, indicates that the sethostent_r routine
@@ -4829,8 +4963,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
* is defined.
*/
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
+/*#define HAS_SETHOSTENT_R / **/
+#define SETHOSTENT_R_PROTO 0 /**/
/* HAS_SETLOCALE_R:
* This symbol, if defined, indicates that the setlocale_r routine
@@ -4842,8 +4976,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
* is defined.
*/
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
+/*#define HAS_SETLOCALE_R / **/
+#define SETLOCALE_R_PROTO 0 /**/
/* HAS_SETNETENT_R:
* This symbol, if defined, indicates that the setnetent_r routine
@@ -4855,8 +4989,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
* is defined.
*/
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
+/*#define HAS_SETNETENT_R / **/
+#define SETNETENT_R_PROTO 0 /**/
/* HAS_SETPROTOENT_R:
* This symbol, if defined, indicates that the setprotoent_r routine
@@ -4868,8 +5002,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
* is defined.
*/
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
+/*#define HAS_SETPROTOENT_R / **/
+#define SETPROTOENT_R_PROTO 0 /**/
/* HAS_SETPWENT_R:
* This symbol, if defined, indicates that the setpwent_r routine
@@ -4881,8 +5015,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
* is defined.
*/
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
+/*#define HAS_SETPWENT_R / **/
+#define SETPWENT_R_PROTO 0 /**/
/* HAS_SETSERVENT_R:
* This symbol, if defined, indicates that the setservent_r routine
@@ -4894,8 +5028,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
* is defined.
*/
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
+/*#define HAS_SETSERVENT_R / **/
+#define SETSERVENT_R_PROTO 0 /**/
/* HAS_SRAND48_R:
* This symbol, if defined, indicates that the srand48_r routine
@@ -4907,8 +5041,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
* is defined.
*/
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
+/*#define HAS_SRAND48_R / **/
+#define SRAND48_R_PROTO 0 /**/
/* HAS_SRANDOM_R:
* This symbol, if defined, indicates that the srandom_r routine
@@ -4920,8 +5054,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
* is defined.
*/
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
+/*#define HAS_SRANDOM_R / **/
+#define SRANDOM_R_PROTO 0 /**/
/* HAS_STRERROR_R:
* This symbol, if defined, indicates that the strerror_r routine
@@ -4933,8 +5067,20 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
* is defined.
*/
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
+/*#define HAS_STRERROR_R / **/
+#define STRERROR_R_PROTO 0 /**/
+
+/* HAS_STRTOD_L:
+ * This symbol, if defined, indicates that the strtod_l routine is
+ * available to convert strings to long doubles.
+ */
+/*#define HAS_STRTOD_L / **/
+
+/* HAS_STRTOLD_L:
+ * This symbol, if defined, indicates that the strtold_l routine is
+ * available to convert strings to long doubles.
+ */
+/*#define HAS_STRTOLD_L / **/
/* HAS_TMPNAM_R:
* This symbol, if defined, indicates that the tmpnam_r routine
@@ -4946,8 +5092,8 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
* is defined.
*/
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
+/*#define HAS_TMPNAM_R / **/
+#define TMPNAM_R_PROTO 0 /**/
/* HAS_TTYNAME_R:
* This symbol, if defined, indicates that the ttyname_r routine
@@ -4959,18 +5105,24 @@
* REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
* is defined.
*/
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
+/*#define HAS_TTYNAME_R / **/
+#define TTYNAME_R_PROTO 0 /**/
+
+/* HAS_WCRTOMB:
+ * This symbol, if defined, indicates that the wcrtomb routine is
+ * available to convert a wide character into a multi-byte character.
+ */
+/*#define HAS_WCRTOMB / **/
/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <mach/cthreads.h>.
*/
/*#define I_MACH_CTHREADS / **/
/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pthread.h>.
*/
/*#define I_PTHREAD / **/
@@ -5012,7 +5164,7 @@
/* HAS_TIMES:
* This symbol, if defined, indicates that the times() routine exists.
* Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
+ * use getrusage(). It may be necessary to include <sys/times.h>.
*/
#define HAS_TIMES /**/
@@ -5081,7 +5233,7 @@
/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
*/
-#define Size_t_size 4 /**/
+#define Size_t_size 8 /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
diff --git a/win32/perlhost.h b/win32/perlhost.h
index f5ffca04e4..d00240f26f 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -995,7 +995,7 @@ PerlLIOLseek(struct IPerlLIO* piPerl, int handle, Off_t offset, int origin)
int
PerlLIOLstat(struct IPerlLIO* piPerl, const char *path, Stat_t *buffer)
{
- return win32_stat(path, buffer);
+ return win32_lstat(path, buffer);
}
char*
diff --git a/win32/win32.c b/win32/win32.c
index 80b4008863..b757715647 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -39,6 +39,7 @@
#include <tlhelp32.h>
#include <io.h>
#include <signal.h>
+#include <winioctl.h>
/* #include "config.h" */
@@ -1462,7 +1463,10 @@ win32_stat(const char *path, Stat_t *sbuf)
dTHX;
int res;
int nlink = 1;
+ unsigned __int64 ino = 0;
+ DWORD vol = 0;
BOOL expect_dir = FALSE;
+ struct _stati64 st;
if (l > 1) {
switch(path[l - 1]) {
@@ -1508,11 +1512,16 @@ win32_stat(const char *path, Stat_t *sbuf)
/* We must open & close the file once; otherwise file attribute changes */
/* might not yet have propagated to "other" hard links of the same file. */
/* This also gives us an opportunity to determine the number of links. */
- HANDLE handle = CreateFileA(path, 0, 0, NULL, OPEN_EXISTING, 0, NULL);
+ HANDLE handle = CreateFileA(path, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
if (handle != INVALID_HANDLE_VALUE) {
BY_HANDLE_FILE_INFORMATION bhi;
- if (GetFileInformationByHandle(handle, &bhi))
+ if (GetFileInformationByHandle(handle, &bhi)) {
nlink = bhi.nNumberOfLinks;
+ ino = bhi.nFileIndexHigh;
+ ino <<= 32;
+ ino |= bhi.nFileIndexLow;
+ vol = bhi.dwVolumeSerialNumber;
+ }
CloseHandle(handle);
}
else {
@@ -1527,7 +1536,17 @@ win32_stat(const char *path, Stat_t *sbuf)
/* path will be mapped correctly above */
res = _stati64(path, sbuf);
+ sbuf->st_dev = vol;
+ sbuf->st_ino = ino;
+ sbuf->st_mode = st.st_mode;
sbuf->st_nlink = nlink;
+ sbuf->st_uid = st.st_uid;
+ sbuf->st_gid = st.st_gid;
+ sbuf->st_rdev = st.st_rdev;
+ sbuf->st_size = st.st_size;
+ sbuf->st_atime = st.st_atime;
+ sbuf->st_mtime = st.st_mtime;
+ sbuf->st_ctime = st.st_ctime;
if (res < 0) {
/* CRT is buggy on sharenames, so make sure it really isn't.
@@ -1575,6 +1594,147 @@ win32_stat(const char *path, Stat_t *sbuf)
return res;
}
+static void
+translate_to_errno(void)
+{
+ /* This isn't perfect, eg. Win32 returns ERROR_ACCESS_DENIED for
+ both permissions errors and if the source is a directory, while
+ POSIX wants EACCES and EPERM respectively.
+
+ Determined by experimentation on Windows 7 x64 SP1, since MS
+ don't document what error codes are returned.
+ */
+ switch (GetLastError()) {
+ case ERROR_BAD_NET_NAME:
+ case ERROR_BAD_NETPATH:
+ case ERROR_BAD_PATHNAME:
+ case ERROR_FILE_NOT_FOUND:
+ case ERROR_FILENAME_EXCED_RANGE:
+ case ERROR_INVALID_DRIVE:
+ case ERROR_PATH_NOT_FOUND:
+ errno = ENOENT;
+ break;
+ case ERROR_ALREADY_EXISTS:
+ errno = EEXIST;
+ break;
+ case ERROR_ACCESS_DENIED:
+ case ERROR_PRIVILEGE_NOT_HELD:
+ errno = EACCES;
+ break;
+ case ERROR_NOT_SAME_DEVICE:
+ errno = EXDEV;
+ break;
+ case ERROR_DISK_FULL:
+ errno = ENOSPC;
+ break;
+ case ERROR_NOT_ENOUGH_QUOTA:
+ errno = EDQUOT;
+ break;
+ default:
+ /* ERROR_INVALID_FUNCTION - eg. symlink on a FAT volume */
+ errno = EINVAL;
+ break;
+ }
+}
+
+/* Adapted from:
+
+https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer
+
+Renamed to avoid conflicts, apparently some SDKs define this
+structure.
+
+Hoisted the symlink data into a new type to allow us to make a pointer
+to it, and to avoid C++ scoping issues.
+
+*/
+
+typedef struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[MAX_PATH*3];
+} MY_SYMLINK_REPARSE_BUFFER, *PMY_SYMLINK_REPARSE_BUFFER;
+
+typedef struct {
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union {
+ MY_SYMLINK_REPARSE_BUFFER SymbolicLinkReparseBuffer;
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ } Data;
+} MY_REPARSE_DATA_BUFFER, *PMY_REPARSE_DATA_BUFFER;
+
+static BOOL
+is_symlink(HANDLE h) {
+ MY_REPARSE_DATA_BUFFER linkdata;
+ const MY_SYMLINK_REPARSE_BUFFER * const sd =
+ &linkdata.Data.SymbolicLinkReparseBuffer;
+ DWORD linkdata_returned;
+
+ if (!DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, NULL, 0, &linkdata, sizeof(linkdata), &linkdata_returned, NULL)) {
+ return FALSE;
+ }
+
+ if (linkdata_returned < offsetof(MY_REPARSE_DATA_BUFFER, Data.SymbolicLinkReparseBuffer.PathBuffer)
+ || linkdata.ReparseTag != IO_REPARSE_TAG_SYMLINK) {
+ /* some other type of reparse point */
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+DllExport int
+win32_lstat(const char *path, Stat_t *sbuf)
+{
+ HANDLE f;
+ int fd;
+ int result;
+ DWORD attr = GetFileAttributes(path); /* doesn't follow symlinks */
+
+ if (attr == INVALID_FILE_ATTRIBUTES) {
+ translate_to_errno();
+ return -1;
+ }
+
+ if (!(attr & FILE_ATTRIBUTE_REPARSE_POINT)) {
+ return win32_stat(path, sbuf);
+ }
+
+ f = CreateFileA(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+ FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0);
+ if (f == INVALID_HANDLE_VALUE) {
+ translate_to_errno();
+ return -1;
+ }
+
+ if (!is_symlink(f)) {
+ CloseHandle(f);
+ return win32_stat(path, sbuf);
+ }
+
+ fd = win32_open_osfhandle((intptr_t)f, 0);
+ result = win32_fstat(fd, sbuf);
+ if (result != -1){
+ sbuf->st_mode = (sbuf->st_mode & ~_S_IFMT) | _S_IFLNK;
+ }
+ close(fd);
+ return result;
+}
+
#define isSLASH(c) ((c) == '/' || (c) == '\\')
#define SKIP_SLASHES(s) \
STMT_START { \
@@ -1668,7 +1828,6 @@ win32_longpath(char *path)
}
else {
/* failed a step, just return without side effects */
- /*PerlIO_printf(Perl_debug_log, "Failed to find %s\n", path);*/
errno = EINVAL;
return NULL;
}
@@ -2955,7 +3114,39 @@ win32_abort(void)
DllExport int
win32_fstat(int fd, Stat_t *sbufptr)
{
- return _fstati64(fd, sbufptr);
+ int result;
+ struct _stati64 st;
+ dTHX;
+ result = _fstati64(fd, &st);
+ if (result == 0) {
+ sbufptr->st_mode = st.st_mode;
+ sbufptr->st_uid = st.st_uid;
+ sbufptr->st_gid = st.st_gid;
+ sbufptr->st_rdev = st.st_rdev;
+ sbufptr->st_size = st.st_size;
+ sbufptr->st_atime = st.st_atime;
+ sbufptr->st_mtime = st.st_mtime;
+ sbufptr->st_ctime = st.st_ctime;
+
+ if (w32_sloppystat) {
+ sbufptr->st_nlink = st.st_nlink;
+ sbufptr->st_dev = st.st_dev;
+ sbufptr->st_ino = st.st_ino;
+ }
+ else {
+ HANDLE handle = (HANDLE)win32_get_osfhandle(fd);
+ BY_HANDLE_FILE_INFORMATION bhi;
+ if (GetFileInformationByHandle(handle, &bhi)) {
+ sbufptr->st_nlink = bhi.nNumberOfLinks;
+ sbufptr->st_ino = bhi.nFileIndexHigh;
+ sbufptr->st_ino <<= 32;
+ sbufptr->st_ino |= bhi.nFileIndexLow;
+ sbufptr->st_dev = bhi.dwVolumeSerialNumber;
+ }
+ }
+ }
+
+ return result;
}
DllExport int
diff --git a/win32/win32.h b/win32/win32.h
index 00d052ac9c..171cbfb8b8 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -731,5 +731,37 @@ DllExport void *win32_signal_context(void);
# define O_ACCMODE (O_RDWR | O_WRONLY | O_RDONLY)
#endif
+/* ucrt at least seems to allocate a whole bit per type,
+ just mask off one bit from the mask for our symlink
+ file type.
+*/
+#define _S_IFLNK ((unsigned)(_S_IFMT ^ (_S_IFMT & -_S_IFMT)))
+#undef S_ISLNK
+#define S_ISLNK(mode) (((mode) & _S_IFMT) == _S_IFLNK)
+
+/*
+
+The default CRT struct stat uses unsigned short for st_dev and st_ino
+which obviously isn't enough, so we define our own structure.
+
+ */
+
+typedef DWORD Dev_t;
+typedef unsigned __int64 Ino_t;
+
+struct w32_stat {
+ Dev_t st_dev;
+ Ino_t st_ino;
+ unsigned short st_mode;
+ DWORD st_nlink;
+ short st_uid;
+ short st_gid;
+ Dev_t st_rdev;
+ Off_t st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+};
+
#endif /* _INC_WIN32_PERL5 */
diff --git a/win32/win32iop.h b/win32/win32iop.h
index 559e1f9cd2..84fe1e5e5c 100644
--- a/win32/win32iop.h
+++ b/win32/win32iop.h
@@ -69,6 +69,7 @@ DllExport FILE* win32_tmpfile(void);
DllExport void win32_abort(void);
DllExport int win32_fstat(int fd,Stat_t *sbufptr);
DllExport int win32_stat(const char *name,Stat_t *sbufptr);
+DllExport int win32_lstat(const char *name,Stat_t *sbufptr);
DllExport int win32_pipe( int *phandles, unsigned int psize, int textmode );
DllExport PerlIO* win32_popen( const char *command, const char *mode );
DllExport PerlIO* win32_popenlist(const char *mode, IV narg, SV **args);
@@ -241,6 +242,7 @@ END_EXTERN_C
# undef stat
#endif
#define stat(pth,bufptr) win32_stat(pth,bufptr)
+#define lstat(pth,bufptr) win32_lstat(pth,bufptr)
#define longpath(pth) win32_longpath(pth)
#define ansipath(pth) win32_ansipath(pth)
#define rename(old,new) win32_rename(old,new)