X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?p=SFmpqapi.git;a=blobdiff_plain;f=SFTypes.h;fp=SFTypes.h;h=5758b9a13042e40c9a3d86b1f71574e48e1e04e1;hp=ec40e07c7cf2aa2baead689a46e7b1cb584b8736;hb=e0b276afa1dc42629b6eaad3ed578c29371f065e;hpb=7214af3eb69acdaef221c1846157ed07438bd0c1 diff --git a/SFTypes.h b/SFTypes.h index ec40e07..5758b9a 100644 --- a/SFTypes.h +++ b/SFTypes.h @@ -3,16 +3,48 @@ #ifndef SFTYPES_INCLUDED #define SFTYPES_INCLUDED +#if defined(_WIN32) || defined(_WIN64) + typedef signed char Int8; typedef signed short Int16; typedef signed long Int32; typedef signed __int64 Int64; +#ifdef _WIN64 +typedef signed __int64 IntPtr; +#else +typedef signed int IntPtr; +#endif + typedef unsigned char UInt8; typedef unsigned short UInt16; typedef unsigned long UInt32; typedef unsigned __int64 UInt64; +#ifdef _WIN64 +typedef unsigned __int64 UIntPtr; +#else +typedef unsigned int UIntPtr; +#endif + +#else + +#include + +typedef int8_t Int8; +typedef int16_t Int16; +typedef int32_t Int32; +typedef int64_t Int64; +typedef intptr_t IntPtr; + +typedef uint8_t UInt8; +typedef uint16_t UInt16; +typedef uint32_t UInt32; +typedef uint64_t UInt64; +typedef uintptr_t UIntPtr; + +#endif + union IntConv { Int8 i8[8]; UInt8 ui8[8];