9 #ifndef _TYPEDEFS_HOST_H 10 #define _TYPEDEFS_HOST_H 18 #if !defined(_MSC_VER) && !defined(__fastcall) 19 #define __fastcall __attribute__((fastcall)) 21 #if !defined(_MSC_VER) && !defined(__cdecl) 22 #define __cdecl __attribute__((cdecl)) 24 #if !defined(_MSC_VER) && !defined(__stdcall) 25 #define __stdcall __attribute__((stdcall)) 29 #define UNIMPLEMENTED { printf("%s unimplemented\n", __FUNCTION__); exit(1); } 30 #define UNIMPLEMENTED_ONCE { printf("%s unimplemented\n", __FUNCTION__); exit(1); } 31 #define ASSERT(x) assert(x) 32 #define ASSERTMSG(m, x) assert(x) 33 #define DPRINT if (0) printf 34 #define DPRINT1 printf 46 #define ANYSIZE_ARRAY 1 60 #if defined(_LP64) || defined(_WIN64) 83 #define MAXUSHORT USHRT_MAX 87 #ifndef _HAVE_RTL_BITMAP 101 #ifndef _HAVE_LARGE_INTEGER 118 #ifndef _HAVE_LIST_ENTRY 126 #ifndef _HAVE_ANSI_STRING 143 #ifndef _HAVE_LIST_ENTRY 151 ListHead->Flink = ListHead->Blink = ListHead;
162 OldFlink = ListHead->
Flink;
163 Entry->Flink = OldFlink;
164 Entry->Blink = ListHead;
166 ListHead->Flink =
Entry;
177 OldBlink = ListHead->
Blink;
178 Entry->Flink = ListHead;
179 Entry->Blink = OldBlink;
181 ListHead->Blink =
Entry;
190 return (
BOOLEAN)(ListHead->Flink == ListHead);
201 OldFlink =
Entry->Flink;
202 OldBlink =
Entry->Blink;
203 OldFlink->
Blink = OldBlink;
204 OldBlink->
Flink = OldFlink;
205 return (
BOOLEAN)(OldFlink == OldBlink);
216 Entry = ListHead->Flink;
217 Flink =
Entry->Flink;
218 ListHead->Flink = Flink;
219 Flink->
Blink = ListHead;
231 Entry = ListHead->Blink;
232 Blink =
Entry->Blink;
233 ListHead->Blink = Blink;
234 Blink->
Flink = ListHead;
239 #ifndef _HAVE_ANSI_STRING 244 #define LOBYTE(w) ((BYTE)(w)) 245 #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF)) 246 #define LOWORD(l) ((WORD)((DWORD_PTR)(l))) 247 #define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF)) 248 #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8))) 249 #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16))) 251 #define MAXULONG 0xFFFFFFFF 253 #define NT_SUCCESS(x) ((x)>=0) 254 #if !defined(__GNUC__) 255 #define FIELD_OFFSET(t,f) ((LONG)(LONG_PTR)&(((t*) 0)->f)) 257 #define FIELD_OFFSET(t,f) ((LONG)__builtin_offsetof(t,f)) 259 #define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s } 260 #define CONTAINING_RECORD(address, type, field) ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) 262 #define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length) 263 #define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length) 264 #define RtlMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length) 266 #define MAKELANGID(p,s) ((((WORD)(s))<<10)|(WORD)(p)) 267 #define PRIMARYLANGID(l) ((WORD)(l)&0x3ff) 268 #define SUBLANGID(l) ((WORD)(l)>>10) 269 #define SUBLANG_NEUTRAL 0x00 272 #define __INTERNAL_DEBUG struct _LIST_ENTRY * PLIST_ENTRY
static __inline VOID InsertTailList(IN PLIST_ENTRY ListHead, IN PLIST_ENTRY Entry)
struct _RTL_BITMAP RTL_BITMAP
struct _UNICODE_STRING * PUNICODE_STRING
struct _LIST_ENTRY LIST_ENTRY
struct _LIST_ENTRY * Blink
struct _RTL_BITMAP_RUN RTL_BITMAP_RUN
static __inline PLIST_ENTRY RemoveHeadList(IN PLIST_ENTRY ListHead)
unsigned short int uint16_t
struct _RTL_BITMAP_RUN * PRTL_BITMAP_RUN
static __inline VOID InsertHeadList(IN PLIST_ENTRY ListHead, IN PLIST_ENTRY Entry)
struct _UNICODE_STRING UNICODE_STRING
struct _LIST_ENTRY * Flink
static __inline BOOLEAN IsListEmpty(IN const LIST_ENTRY *ListHead)
union _LARGE_INTEGER LARGE_INTEGER
struct _ANSI_STRING * PANSI_STRING
static __inline PLIST_ENTRY RemoveTailList(IN PLIST_ENTRY ListHead)
struct _RTL_BITMAP * PRTL_BITMAP
struct _ANSI_STRING ANSI_STRING
const UNICODE_STRING * PCUNICODE_STRING
static __inline VOID InitializeListHead(IN PLIST_ENTRY ListHead)
static __inline BOOLEAN RemoveEntryList(IN PLIST_ENTRY Entry)
struct _LARGE_INTEGER::@2269 u
union _LARGE_INTEGER * PLARGE_INTEGER
base of all file and directory entries