64-bitness fixes from Bill Lash
authorDavid Griffith <dave@661.org>
Wed, 19 Jun 2013 18:57:08 +0000 (11:57 -0700)
committerDavid Griffith <dave@661.org>
Wed, 19 Jun 2013 18:57:08 +0000 (11:57 -0700)
src/blorb/blorb.h

index 6c02dbcfe628364cd0bad9d50a7ddd26c9c3f29a..cac93e52edebfe23a0b546b68b9675b1c01046c7 100644 (file)
 /* #define BLORB_BIG_ENDIAN */
 
 #define BLORB_LITTLE_ENDIAN
-typedef unsigned long uint32;
+#include <limits.h>
+#if UINT_MAX == (1UL<<32)-1UL
+typedef unsigned int  uint32;
+#else
+typedef unsigned long  uint32;
+#endif
+
 typedef unsigned short uint16;
 
 /* End of things you have to edit. */