X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Ftypes.h;h=6af6ab740289761009ec0b8c25766a3834b3c2c9;hp=ccc576d8dcc19057a00934eee52b76220b94422e;hb=e0a27e1bd83ff2d60745dd6030e0f5ef7ef97b82;hpb=cd3c954f7aa80b7388abe13e7ae9b924a1bb4953 diff --git a/lib/types.h b/lib/types.h index ccc576d..6af6ab7 100644 --- a/lib/types.h +++ b/lib/types.h @@ -1,6 +1,8 @@ #ifndef __rfxtypes_h__ #define __rfxtypes_h__ +#include "../config.h" + #ifndef TRUE #define TRUE (1) #endif @@ -30,13 +32,34 @@ // SWF Types +#if SIZEOF_SIGNED_LONG_LONG != 8 +#error "no way to define 64 bit integer" +#endif +#if SIZEOF_SIGNED != 4 +#error "don't know how to define 32 bit integer" +#endif +#if SIZEOF_SIGNED_SHORT != 2 +#error "don't know how to define 16 bit integer" +#endif +#if SIZEOF_SIGNED_CHAR != 1 +#error "don't know how to define 8 bit integer" +#endif + typedef unsigned long long U64; typedef signed long long S64; -typedef unsigned long U32; -typedef signed long S32; +typedef unsigned U32; +typedef signed S32; typedef unsigned short U16; typedef signed short S16; typedef unsigned char U8; typedef signed char S8; +#if SIZEOF_VOIDP == SIZEOF_SIGNED_LONG_LONG +typedef unsigned long long ptroff_t; +#elif SIZEOF_VOIDP == SIZEOF_SIGNED +typedef unsigned ptroff_t; +#else +#error "Unknown pointer size" +#endif + #endif