aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2006-07-09 13:01:15 +0000
committerMax Horn2006-07-09 13:01:15 +0000
commitf35f4a4d1c41a8d186621b912b985dd5d796632a (patch)
tree1468779935932e47d32e838458df8d2cf3a5bbe8 /common
parent880838514f28fd298e6418f2096d61b3f757e237 (diff)
downloadscummvm-rg350-f35f4a4d1c41a8d186621b912b985dd5d796632a.tar.gz
scummvm-rg350-f35f4a4d1c41a8d186621b912b985dd5d796632a.tar.bz2
scummvm-rg350-f35f4a4d1c41a8d186621b912b985dd5d796632a.zip
Use START_PACK_STRUCTS / END_PACK_STRUCTS when available, instead of checking for GCC / not GCC
svn-id: r23458
Diffstat (limited to 'common')
-rw-r--r--common/scummsys.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index d9fa056729..a76ca494e6 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -70,6 +70,20 @@
#endif
+//
+// By default we try to use pragma push/pop to ensure various structs we use
+// are "packed". If your compiler doesn't support this pragma, you are in for
+// a problem. If you are lucky, an equivalent pragma is available, in which
+// case you can redefine these two macros appropriately. Or maybe your port
+// simply *always* packs everything, in which case you could #undefine them.
+//
+// If neither is possible, tough luck. Try to contact the team, maybe we can
+// come up with a solution, though I wouldn't hold my breath on it :-/.
+//
+#define START_PACK_STRUCTS pack(push, 1)
+#define END_PACK_STRUCTS pack(pop)
+
+
#if defined(_MSC_VER) && !defined(__SYMBIAN32__) && !defined(_WIN32_WCE)
#define scumm_stricmp stricmp
@@ -357,11 +371,6 @@
//
// Fallbacks / default values for various special macros
//
-#ifndef START_PACK_STRUCTS
-#define START_PACK_STRUCTS pack(push, 1)
-#define END_PACK_STRUCTS pack(pop)
-#endif
-
#ifndef FORCEINLINE
#define FORCEINLINE inline
#endif