equal
deleted
inserted
replaced
41 |
41 |
42 // Stuff for GCC |
42 // Stuff for GCC |
43 #if defined(__GNUC__) |
43 #if defined(__GNUC__) |
44 # define NORETURN |
44 # define NORETURN |
45 # define FORCEINLINE inline |
45 # define FORCEINLINE inline |
46 # define INLINE inline |
|
47 # define CDECL |
46 # define CDECL |
48 //#include <alloca.h> |
47 //#include <alloca.h> |
49 //#include <malloc.h> |
48 //#include <malloc.h> |
50 # define __int64 long long |
49 # define __int64 long long |
51 # define NOT_REACHED() |
50 # define NOT_REACHED() |
60 // Stuff for MSVC |
59 // Stuff for MSVC |
61 #if defined(_MSC_VER) |
60 #if defined(_MSC_VER) |
62 # include <malloc.h> // alloca() |
61 # include <malloc.h> // alloca() |
63 # define NORETURN __declspec(noreturn) |
62 # define NORETURN __declspec(noreturn) |
64 # define FORCEINLINE __forceinline |
63 # define FORCEINLINE __forceinline |
65 # define INLINE _inline |
64 # define inline _inline |
66 # define CDECL _cdecl |
65 # define CDECL _cdecl |
67 # define NOT_REACHED() _assume(0) |
66 # define NOT_REACHED() _assume(0) |
68 # define snprintf _snprintf |
67 # define snprintf _snprintf |
69 # define vsnprintf _vsnprintf |
68 # define vsnprintf _vsnprintf |
70 # undef TTD_ALIGNMENT_4 |
69 # undef TTD_ALIGNMENT_4 |
114 #if defined(TTD_BIG_ENDIAN) |
113 #if defined(TTD_BIG_ENDIAN) |
115 |
114 |
116 # define TTD_ALIGNMENT_2 |
115 # define TTD_ALIGNMENT_2 |
117 # define TTD_ALIGNMENT_4 |
116 # define TTD_ALIGNMENT_4 |
118 |
117 |
119 static uint32 INLINE TO_LE32(uint32 x) { return BSWAP32(x); } |
118 static inline uint32 TO_LE32(uint32 x) { return BSWAP32(x); } |
120 static uint16 INLINE TO_LE16(uint16 x) { return BSWAP16(x); } |
119 static inline uint16 TO_LE16(uint16 x) { return BSWAP16(x); } |
121 static uint32 INLINE FROM_LE32(uint32 x) { return BSWAP32(x); } |
120 static inline uint32 FROM_LE32(uint32 x) { return BSWAP32(x); } |
122 static uint16 INLINE FROM_LE16(uint16 x) { return BSWAP16(x); } |
121 static inline uint16 FROM_LE16(uint16 x) { return BSWAP16(x); } |
123 #define TO_BE32(x) x |
122 #define TO_BE32(x) x |
124 #define TO_BE16(x) x |
123 #define TO_BE16(x) x |
125 #define FROM_BE32(x) x |
124 #define FROM_BE32(x) x |
126 #define FROM_BE16(x) x |
125 #define FROM_BE16(x) x |
127 #define TO_BE32X(x) x |
126 #define TO_BE32X(x) x |