From 988cbaf4973bc09e06f03fc4e02bbaabf32b1983 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 9 Jan 2012 07:07:43 -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 2d7235d60..b45af55ea 100644 --- a/include/begin_code.h +++ b/include/begin_code.h @@ -87,7 +87,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 #endif /* Compiler needs structure packing set */ /* Set up compiler-specific options for inlining functions */