diff --git a/reactos/include/host/typedefs.h b/reactos/include/host/typedefs.h index 0ddc3f460e8..791933b2519 100644 --- a/reactos/include/host/typedefs.h +++ b/reactos/include/host/typedefs.h @@ -44,32 +44,27 @@ #define ANYSIZE_ARRAY 1 -/* Type definitions */ -typedef void VOID, *PVOID, *HANDLE; -typedef HANDLE HKEY, *PHKEY; -typedef unsigned char UCHAR, *PUCHAR, BYTE, *LPBYTE; +/* Basic types + Emulate a LLP64 memory model using a LP64 compiler */ +typedef void VOID, *PVOID; typedef char CHAR, *PCHAR, *PSTR; -typedef const char CCHAR; -typedef const char *PCSTR, *LPCSTR; +typedef const char CCHAR, *PCSTR, *LPCSTR; +typedef unsigned char UCHAR, *PUCHAR, BYTE, *LPBYTE, BOOLEAN, *PBOOLEAN; typedef short SHORT, *PSHORT; -typedef unsigned short USHORT, *PUSHORT; -typedef unsigned short WORD, *PWORD, *LPWORD; -typedef int LONG, *PLONG, *LPLONG; -typedef unsigned int ULONG, *PULONG, DWORD, *LPDWORD; +typedef unsigned short USHORT, *PUSHORT, WORD, *PWORD, *LPWORD, WCHAR, *PWCHAR, *PWSTR, *LPWSTR; +typedef const unsigned short *PCWSTR, *LPCWSTR; +typedef int INT, LONG, *PLONG, *LPLONG, BOOL; +typedef unsigned int UINT, *PUINT, *LPUINT, ULONG, *PULONG, DWORD, *LPDWORD; +typedef long LONG_PTR, *PLONG_PTR, INT_PTR, *PINT_PTR; +typedef unsigned long ULONG_PTR, DWORD_PTR, *PULONG_PTR, UINT_PTR, *PUINT_PTR; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; -typedef int INT; -typedef unsigned int UINT, *PUINT, *LPUINT, UINT_PTR, *PUINT_PTR; -typedef UCHAR BOOLEAN, *PBOOLEAN; -typedef int BOOL; -typedef long int LONG_PTR, *PLONG_PTR; -typedef long unsigned int ULONG_PTR, DWORD_PTR, *PULONG_PTR; -typedef ULONG_PTR SIZE_T, *PSIZE_T; -typedef unsigned short WCHAR, *PWCHAR, *PWSTR, *LPWSTR; -typedef const unsigned short *PCWSTR, *LPCWSTR; -typedef int NTSTATUS; -typedef int POOL_TYPE; + +/* Derived types */ +typedef PVOID HANDLE, HKEY, *PHKEY; +typedef INT NTSTATUS, POOL_TYPE; typedef LONG HRESULT; +typedef ULONG_PTR SIZE_T, *PSIZE_T; #define MAXUSHORT USHRT_MAX diff --git a/reactos/tools/winebuild/res32.c b/reactos/tools/winebuild/res32.c index fad3429b721..82e938c7332 100644 --- a/reactos/tools/winebuild/res32.c +++ b/reactos/tools/winebuild/res32.c @@ -207,7 +207,7 @@ static void load_next_resource( DLLSPEC *spec ) res->data = file_pos - 2*sizeof(DWORD) + hdr_size; get_string( &res->type ); get_string( &res->name ); - if ((ULONG_PTR)file_pos & 2) get_word(); /* align to dword boundary */ + if ((UINT_PTR)file_pos & 2) get_word(); /* align to dword boundary */ get_dword(); /* skip data version */ get_word(); /* skip mem options */ res->lang = get_word();