fixes, standalone works?
[ia32rtools.git] / c_auto.h
1 // note: include after system headers
2
3 //#pragma GCC diagnostic ignored "-Wparentheses"
4
5 #define u8 uint8_t
6 #define u16 uint16_t
7 #define u32 uint32_t
8 #define u64 uint64_t
9 #define s8 int8_t
10 #define s16 int16_t
11 #define s32 int32_t
12 #define s64 int64_t
13 #define bool int
14 #define _BYTE BYTE
15 #define _WORD WORD
16 #define _DWORD DWORD
17 #define _UNKNOWN uint8_t
18 #undef LOBYTE
19 #undef LOWORD
20 #undef HIBYTE
21 #undef HIWORD
22 #define LOBYTE(x)   (*((_BYTE*)&(x)))
23 #define LOWORD(x)   (*((_WORD*)&(x)))
24 #define HIBYTE(x)   (*((_BYTE*)&(x)+1))
25 #define HIWORD(x)   (*((_WORD*)&(x)+1))
26 #define BYTE0(x)    (*((_BYTE*)&(x)+0))
27 #define BYTE1(x)    (*((_BYTE*)&(x)+1))
28 #define BYTE2(x)    (*((_BYTE*)&(x)+2))
29 #define BYTE3(x)    (*((_BYTE*)&(x)+3))
30
31 #define memcpy_0 memcpy
32
33 #define noreturn __attribute__((noreturn))
34
35 #ifdef __WINE__
36 #define PCVOID LPCVOID
37 #define __VALIST __ms_va_list
38 #endif