aboutsummaryrefslogtreecommitdiff
path: root/scummsys.h
diff options
context:
space:
mode:
authorLudvig Strigeus2001-10-09 17:38:20 +0000
committerLudvig Strigeus2001-10-09 17:38:20 +0000
commit669dd77ee2621581ea2e11020d1cfc05f8752e59 (patch)
tree9deee86aba737aae3f388b5643f9e9ead1371da0 /scummsys.h
parentc30932afbe1af874e3a2aeb95fa4ee5de4d6e38e (diff)
downloadscummvm-rg350-669dd77ee2621581ea2e11020d1cfc05f8752e59.tar.gz
scummvm-rg350-669dd77ee2621581ea2e11020d1cfc05f8752e59.tar.bz2
scummvm-rg350-669dd77ee2621581ea2e11020d1cfc05f8752e59.zip
Autodetection of endianness.
svn-id: r3412
Diffstat (limited to 'scummsys.h')
-rw-r--r--scummsys.h21
1 files changed, 19 insertions, 2 deletions
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 <SDL_byteorder.h>
+
+#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