diff options
author | Yves Orton <demerphq@gmail.com> | 2020-02-08 11:02:08 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2020-02-08 11:02:08 +0100 |
commit | f8e72076393d9d7449840dbf7eb1feb3f9616113 (patch) | |
tree | 1bf39070391656c9abc4e8e470e728029f623fdc | |
parent | 16933d619ff0a6284a4a90626ab5d39e472c694f (diff) | |
download | perl-f8e72076393d9d7449840dbf7eb1feb3f9616113.tar.gz |
fix defines for PERL_BITFIELDxx on Linux and Win32
for some reason PERL_BITFIELD32 is defined as "unsigned" which is
defined to be the same as "unsigned int" which could be 16 bits.
This changes the definition for PERL_BITFIELDxx to be the same
on both platforms and to use the full names for the type, and to
use a type which is guaranteed to be at least 32 bits long for
PERL_BITFIELD32.
-rw-r--r-- | perl.h | 6 | ||||
-rw-r--r-- | win32/win32.h | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -3827,13 +3827,13 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h */ /* macros to define bit-fields in structs. */ #ifndef PERL_BITFIELD8 -# define PERL_BITFIELD8 unsigned +# define PERL_BITFIELD8 unsigned char #endif #ifndef PERL_BITFIELD16 -# define PERL_BITFIELD16 unsigned +# define PERL_BITFIELD16 unsigned short int #endif #ifndef PERL_BITFIELD32 -# define PERL_BITFIELD32 unsigned +# define PERL_BITFIELD32 unsigned long int #endif #include "sv.h" diff --git a/win32/win32.h b/win32/win32.h index e9138af7a3..a91776cf0e 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -255,8 +255,8 @@ 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 -#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++ */ |