From 669dd77ee2621581ea2e11020d1cfc05f8752e59 Mon Sep 17 00:00:00 2001 From: Ludvig Strigeus Date: Tue, 9 Oct 2001 17:38:20 +0000 Subject: Autodetection of endianness. svn-id: r3412 --- scummsys.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'scummsys.h') diff --git a/scummsys.h b/scummsys.h index ae91e1e3e5..7002994999 100644 --- a/scummsys.h +++ b/scummsys.h @@ -17,8 +17,12 @@ * * Change Log: * $Log$ - * Revision 1.1 2001/10/09 14:30:14 strigeus - * Initial revision + * Revision 1.2 2001/10/09 17:38:20 strigeus + * Autodetection of endianness. + * + * Revision 1.1.1.1 2001/10/09 14:30:14 strigeus + * + * initial revision * * */ @@ -44,6 +48,19 @@ typedef signed long int32; #elif defined(UNIX) +/* need this for the SDL_BYTEORDER define */ + +#include + +#if SDL_BYTEORDER == SDL_LIL_ENDIAN +#define SCUMM_LITTLE_ENDIAN +#elif SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SCUMM_BIG_ENDIAN +#define SCUMM_NEED_ALIGNMENT +#else +#error Neither SDL_BIG_ENDIAN nor SDL_LITTLE_ENDIAN is set. +#endif + #define FORCEINLINE inline #define NORETURN #define CDECL -- cgit v1.2.3