From f35f4a4d1c41a8d186621b912b985dd5d796632a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 9 Jul 2006 13:01:15 +0000 Subject: Use START_PACK_STRUCTS / END_PACK_STRUCTS when available, instead of checking for GCC / not GCC svn-id: r23458 --- common/scummsys.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'common') 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 -- cgit v1.2.3