summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2008-02-01 05:40:41 -0800
committerSteve Peters <steve@fisharerojo.org>2008-02-12 14:58:50 +0000
commit654eccd594bfe8deab367b0f4cdda726a7796ff3 (patch)
treef063ed3713d5cb4ef88ad77b357d58492635b436 /win32
parent7918f24d20384771923d344a382e1d16d9552018 (diff)
downloadperl-654eccd594bfe8deab367b0f4cdda726a7796ff3.tar.gz
Fix bit-fields for VC [was RE: [perl #50386] GIMME_V broken with 5.10.0/GCC and XS?]
From: "Jan Dubois" <jand@activestate.com> Message-ID: <02ee01c8651b$17ef72f0$47ce58d0$@com> p4raw-id: //depot/perl@33292
Diffstat (limited to 'win32')
-rw-r--r--win32/makefile.mk2
-rw-r--r--win32/win32.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 3f145b8e67..5a0e0208c7 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -522,7 +522,7 @@ LIBOUT_FLAG =
# NOTE: we assume that GCC uses MSVCRT.DLL
# See comments about PERL_MSVCRT_READFIX in the "cl" compiler section below.
-BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
+BUILDOPT += -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX
.ELSE
diff --git a/win32/win32.h b/win32/win32.h
index 224c657507..7bfeb15503 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -170,6 +170,14 @@ struct utsname {
/* Compiler-specific stuff. */
+#if defined(_MSC_VER) || defined(__MINGW32__)
+/* VC uses non-standard way to determine the size and alignment if bit-fields */
+/* MinGW will compiler with -mms-bitfields, so should use the same types */
+# define PERL_BITFIELD8 unsigned char
+# define PERL_BITFIELD16 unsigned short
+# define PERL_BITFIELD32 unsigned int
+#endif
+
#ifdef __BORLANDC__ /* Borland C++ */
#if (__BORLANDC__ <= 0x520)