summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-01-09 07:07:43 -0500
committerSam Lantinga <slouken@libsdl.org>2012-01-09 07:07:43 -0500
commit0117a7d78730cd9fd20f3dbea9ede7875f557a5d (patch)
tree6983da9764c8cafd443e2f04ba3a16306588537f /include
parent96024440e65dbc1f2dff2bb5ddc38bfa20e23423 (diff)
Fixed structure alignment mismatch between Visual Studio and gcc on 64-bit architectures.
Diffstat (limited to 'include')
-rw-r--r--include/begin_code.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/begin_code.h b/include/begin_code.h
index 2d7235d6..b45af55e 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 */