From 60f8169d18565534757b2a6e129b94ff275c2068 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 9 Jan 2012 07:06:36 -0500 Subject: [PATCH] Fixed structure alignment mismatch between Visual Studio and gcc on 64-bit architectures. --- include/begin_code.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/begin_code.h b/include/begin_code.h index 2f3d0247e..27e2f7bc7 100644 --- a/include/begin_code.h +++ b/include/begin_code.h @@ -132,7 +132,12 @@ #ifdef __BORLANDC__ #pragma nopackwarning #endif +#ifdef _M_X64 +/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */ +#pragma pack(push,8) +#else #pragma pack(push,4) +#endif #elif (defined(__MWERKS__) && defined(__MACOS__)) #pragma options align=mac68k4byte #pragma enumsalwaysint on