diff options
author | Sam Lantinga <slouken@libsdl.org> | 2012-01-09 07:07:43 -0500 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2012-01-09 07:07:43 -0500 |
commit | 1781323edc30f0738fe1e8fd9da97eab3b981eef (patch) | |
tree | 6983da9764c8cafd443e2f04ba3a16306588537f /include/begin_code.h | |
parent | 094db187960884a43a7667a1d9f15a38e7bf2dc1 (diff) |
Fixed structure alignment mismatch between Visual Studio and gcc on 64-bit architectures.
Diffstat (limited to 'include/begin_code.h')
-rw-r--r-- | include/begin_code.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/begin_code.h b/include/begin_code.h index 2d7235d60e..b45af55ea0 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 */ |