82 lines
2.4 KiB
Diff
82 lines
2.4 KiB
Diff
--- a/win32/win32.h
|
|
+++ b/win32/win32.h
|
|
@@ -259,8 +259,10 @@
|
|
extern const __declspec(selectany) union PerlNan __PL_nan_u = { 0x7FF8000000000000UI64 };
|
|
#define NV_NAN ((NV)__PL_nan_u.__d)
|
|
|
|
+#endif /* _MSC_VER */
|
|
+
|
|
/* The CRT was rewritten in VS2015. */
|
|
-#if _MSC_VER >= 1900
|
|
+#if (defined(_MSC_VER) && _MSC_VER >= 1900) || defined(_UCRT)
|
|
|
|
/* No longer declared in stdio.h */
|
|
EXTERN_C char *gets(char* buffer);
|
|
@@ -295,11 +297,7 @@
|
|
#define PERLIO_FILE_flag(f) ((int)(((__crt_stdio_stream_data*)(f))->_flags))
|
|
#define PERLIO_FILE_file(f) (*(int*)(&((__crt_stdio_stream_data*)(f))->_file))
|
|
|
|
-#endif
|
|
-
|
|
-#endif /* _MSC_VER */
|
|
-
|
|
-#if (!defined(_MSC_VER)) || (defined(_MSC_VER) && _MSC_VER < 1900)
|
|
+#else
|
|
|
|
/* Note: PERLIO_FILE_ptr/base/cnt are not actually used for GCC or <VS2015
|
|
* since FILE_ptr/base/cnt do the same thing anyway but it doesn't hurt to
|
|
--- a/win32/config.gc
|
|
+++ b/win32/config.gc
|
|
@@ -1087,11 +1087,11 @@
|
|
startsh='#!/bin/sh'
|
|
static_ext=' '
|
|
stdchar='char'
|
|
-stdio_base='((fp)->_base)'
|
|
-stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
|
|
-stdio_cnt='((fp)->_cnt)'
|
|
+stdio_base='PERLIO_FILE_base(fp)'
|
|
+stdio_bufsiz='(PERLIO_FILE_cnt(fp) + PERLIO_FILE_ptr(fp) - PERLIO_FILE_base(fp))'
|
|
+stdio_cnt='PERLIO_FILE_cnt(fp)'
|
|
stdio_filbuf=''
|
|
-stdio_ptr='((fp)->_ptr)'
|
|
+stdio_ptr='PERLIO_FILE_ptr(fp)'
|
|
stdio_stream_array=''
|
|
strerror_r_proto='0'
|
|
strings='/usr/include/string.h'
|
|
--- a/win32/config_H.gc
|
|
+++ b/win32/config_H.gc
|
|
@@ -1086,9 +1086,9 @@
|
|
*/
|
|
#define USE_STDIO_PTR /**/
|
|
#ifdef USE_STDIO_PTR
|
|
-#define FILE_ptr(fp) ((fp)->_ptr)
|
|
+#define FILE_ptr(fp) PERLIO_FILE_ptr(fp)
|
|
#define STDIO_PTR_LVALUE /**/
|
|
-#define FILE_cnt(fp) ((fp)->_cnt)
|
|
+#define FILE_cnt(fp) PERLIO_FILE_cnt(fp)
|
|
#define STDIO_CNT_LVALUE /**/
|
|
/*#define STDIO_PTR_LVAL_SETS_CNT / **/
|
|
#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
|
|
@@ -1116,8 +1116,8 @@
|
|
*/
|
|
#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:
|
|
--- a/dist/threads/threads.xs
|
|
+++ a/dist/threads/threads.xs
|
|
@@ -16,7 +16,7 @@
|
|
# endif
|
|
# if defined(__MINGW64__)
|
|
# include <intrin.h>
|
|
-# define setjmp(x) _setjmpex((x), mingw_getsp())
|
|
+# define setjmp(x) _setjmp((x), mingw_getsp())
|
|
# endif
|
|
#endif
|
|
#define NEED_PL_signals
|