This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix defines for PERL_BITFIELDxx on Linux and Win32
[perl5.git]
/
win32
/
win32.h
diff --git
a/win32/win32.h
b/win32/win32.h
index
26c3ac2
..
a91776c
100644
(file)
--- a/
win32/win32.h
+++ b/
win32/win32.h
@@
-70,11
+70,6
@@
# define __int64 long long
# endif
# define Win32_Winsock
# define __int64 long long
# endif
# define Win32_Winsock
-#ifdef __cplusplus
-/* Mingw32 gcc -xc++ objects to __attribute((unused)) at least */
-#undef PERL_UNUSED_DECL
-#define PERL_UNUSED_DECL
-#endif
#endif
#endif
@@
-85,7
+80,7
@@
/* now even GCC supports __declspec() */
/* miniperl has no reason to export anything */
/* now even GCC supports __declspec() */
/* miniperl has no reason to export anything */
-#if defined(PERL_IS_MINIPERL)
&& !defined(UNDER_CE) && defined(_MSC_VER)
+#if defined(PERL_IS_MINIPERL)
# define DllExport
#else
# if defined(PERLDLL)
# define DllExport
#else
# if defined(PERLDLL)
@@
-260,23
+255,18
@@
struct utsname {
/* VC uses non-standard way to determine the size and alignment if bit-fields */
/* MinGW will compile with -mms-bitfields, so should use the same types */
#define PERL_BITFIELD8 unsigned char
/* VC uses non-standard way to determine the size and alignment if bit-fields */
/* MinGW will compile with -mms-bitfields, so should use the same types */
#define PERL_BITFIELD8 unsigned char
-#define PERL_BITFIELD16 unsigned short
-#define PERL_BITFIELD32 unsigned int
+#define PERL_BITFIELD16 unsigned short
int
+#define PERL_BITFIELD32 unsigned
long
int
#ifdef _MSC_VER /* Microsoft Visual C++ */
#ifdef _MSC_VER /* Microsoft Visual C++ */
-#ifndef UNDER_CE
typedef long uid_t;
typedef long gid_t;
typedef unsigned short mode_t;
typedef long uid_t;
typedef long gid_t;
typedef unsigned short mode_t;
-#endif
#if _MSC_VER < 1800
#define isnan _isnan /* Defined already in VC++ 12.0 */
#endif
#if _MSC_VER < 1800
#define isnan _isnan /* Defined already in VC++ 12.0 */
#endif
-#ifdef UNDER_CE /* revisit what function this becomes celib vs corelibc, prv warning here*/
-# undef snprintf
-#endif
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#define vsnprintf _vsnprintf
@@
-285,8
+275,7
@@
typedef unsigned short mode_t;
# pragma intrinsic(_rotl64,_rotr64)
#endif
# pragma intrinsic(_rotl64,_rotr64)
#endif
-#pragma warning(push)
-#pragma warning(disable:4756;disable:4056)
+MSVC_DIAG_IGNORE(4756 4056)
PERL_STATIC_INLINE
double S_Infinity() {
/* this is a real C literal which can get further constant folded
PERL_STATIC_INLINE
double S_Infinity() {
/* this is a real C literal which can get further constant folded
@@
-295,7
+284,8
@@
double S_Infinity() {
folding INF is creating -INF */
return (DBL_MAX+DBL_MAX);
}
folding INF is creating -INF */
return (DBL_MAX+DBL_MAX);
}
-#pragma warning(pop)
+MSVC_DIAG_RESTORE
+
#define NV_INF S_Infinity()
/* selectany allows duplicate and unused data symbols to be removed by
#define NV_INF S_Infinity()
/* selectany allows duplicate and unused data symbols to be removed by
@@
-735,16
+725,13
@@
EXTERN_C _CRTIMP ioinfo* __pioinfo[];
DllExport void *win32_signal_context(void);
#define PERL_GET_SIG_CONTEXT win32_signal_context()
DllExport void *win32_signal_context(void);
#define PERL_GET_SIG_CONTEXT win32_signal_context()
-#ifdef UNDER_CE
-#define Win_GetModuleHandle XCEGetModuleHandleA
-#define Win_GetProcAddress XCEGetProcAddressA
-#define Win_GetModuleFileName XCEGetModuleFileNameA
-#define Win_CreateSemaphore CreateSemaphoreW
-#else
#define Win_GetModuleHandle GetModuleHandle
#define Win_GetProcAddress GetProcAddress
#define Win_GetModuleFileName GetModuleFileName
#define Win_CreateSemaphore CreateSemaphore
#define Win_GetModuleHandle GetModuleHandle
#define Win_GetProcAddress GetProcAddress
#define Win_GetModuleFileName GetModuleFileName
#define Win_CreateSemaphore CreateSemaphore
+
+#if defined(PERL_CORE) && !defined(O_ACCMODE)
+# define O_ACCMODE (O_RDWR | O_WRONLY | O_RDONLY)
#endif
#endif /* _INC_WIN32_PERL5 */
#endif
#endif /* _INC_WIN32_PERL5 */