18 #ifndef __INCLUDE_SOPHIST_H__
19 #define __INCLUDE_SOPHIST_H__
21 #define SOPHIST_compiletime_assert(name,val) \
22 typedef int SOPHIST__assert##name[(val) ? 1 : -1]
25 #if (defined(__sparc__) || defined(__sparc)) && \
26 (defined(__arch64__) || defined(__sparcv9) || defined(__sparc_v9__))
27 #define SOPHIST_sparc64
30 #if (defined(linux) || defined(__linux__)) && \
31 (defined(__alpha)||defined(__alpha__)||defined(__x86_64__)||defined(_M_X64))
32 #define SOPHIST_linux64
51 #if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) \
52 || (defined(__alpha) && defined(__DECC))
54 typedef signed __int64 SOPHIST_int64;
55 typedef unsigned __int64 SOPHIST_uint64;
56 #define SOPHIST_has_64 1
57 #define SOPHIST_int64_constant(x) (x##i64)
58 #define SOPHIST_uint64_constant(x) (x##ui64)
59 #define SOPHIST_printf_format64 "I64"
61 #elif defined(__LP64__) || defined(__powerpc64__) || defined(SOPHIST_sparc64)
63 typedef signed long SOPHIST_int64;
64 typedef unsigned long SOPHIST_uint64;
66 #define SOPHIST_has_64 1
67 #define SOPHIST_int64_constant(x) ((SOPHIST_int64) x)
68 #define SOPHIST_uint64_constant(x) ((SOPHIST_uint64) x)
69 #define SOPHIST_printf_format64 "l"
71 #elif defined(_LONG_LONG) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) \
72 || defined(__GNUC__) || defined(__MWERKS__) || defined(__APPLE_CC__) \
73 || defined(sgi) || defined (__sgi) || defined(__sgi__) \
76 typedef signed long long SOPHIST_int64;
77 typedef unsigned long long SOPHIST_uint64;
79 #define SOPHIST_has_64 1
80 #define SOPHIST_int64_constant(x) (x##LL)
81 #define SOPHIST_uint64_constant(x) (x##ULL)
82 #define SOPHIST_printf_format64 "ll"
86 #ifndef SOPHIST_has_64
87 #define SOPHIST_has_64 0
102 #if defined(SOPHIST_linux64) || defined(SOPHIST_sparc64) \
103 || defined(__osf__) || (defined(_WIN64) && !defined(_XBOX)) \
104 || defined(__64BIT__) \
105 || defined(__LP64) || defined(__LP64__) || defined(_LP64) \
106 || defined(_ADDR64) || defined(_CRAYC) \
108 #define SOPHIST_pointer64 1
116 #define SOPHIST_pointer64 0
130 #define SOPHIST_little_endian 1
131 #define SOPHIST_big_endian 2
133 #if defined(__386__) || defined(i386) || defined(__i386__) \
134 || defined(__X86) || defined(_M_IX86) \
135 || defined(_M_X64) || defined(__x86_64__) \
136 || defined(alpha) || defined(__alpha) || defined(__alpha__) \
137 || defined(_M_ALPHA) \
138 || defined(ARM) || defined(_ARM) || defined(__arm__) \
139 || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \
140 || defined(_WIN32_WCE) || defined(__NT__) \
141 || defined(__MIPSEL__)
142 #define SOPHIST_endian SOPHIST_little_endian
144 #define SOPHIST_endian SOPHIST_big_endian
unsigned char SOPHIST_uint8
Definition: sophist.h:37
#define SOPHIST_compiletime_assert(name, val)
Definition: sophist.h:21
int8_t int8
Definition: Define.h:148
int64_t int64
Definition: Define.h:145
signed int SOPHIST_int32
Definition: sophist.h:46
SOPHIST_uint32 SOPHIST_uintptr
Definition: sophist.h:122
signed short SOPHIST_int16
Definition: sophist.h:39
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
uint16_t uint16
Definition: Define.h:151
unsigned int SOPHIST_uint32
Definition: sophist.h:47
signed char SOPHIST_int8
Definition: sophist.h:36
SOPHIST_int32 SOPHIST_intptr
Definition: sophist.h:121
unsigned short SOPHIST_uint16
Definition: sophist.h:40