[ros-diffs] [cfinck] 37468: - Rearrange "host/typedefs.h" to make it look more logical - Fix wrong definition of INT_PTR and UINT_PTR in this file - Revert a hack added to winebuild in r32609 and r37206, which was added to work around these previously buggy definitions
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Wed Nov 19 22:05:50 CET 2008
Author: cfinck
Date: Wed Nov 19 15:05:49 2008
New Revision: 37468
URL: http://svn.reactos.org/svn/reactos?rev=37468&view=rev
Log:
- Rearrange "host/typedefs.h" to make it look more logical
- Fix wrong definition of INT_PTR and UINT_PTR in this file
- Revert a hack added to winebuild in r32609 and r37206, which was added to work around these previously buggy definitions
Modified:
trunk/reactos/include/host/typedefs.h
trunk/reactos/tools/winebuild/res32.c
Modified: trunk/reactos/include/host/typedefs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/host/typedefs.h?rev=37468&r1=37467&r2=37468&view=diff
==============================================================================
--- trunk/reactos/include/host/typedefs.h [iso-8859-1] (original)
+++ trunk/reactos/include/host/typedefs.h [iso-8859-1] Wed Nov 19 15:05:49 2008
@@ -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;
+
+/* Derived types */
+typedef PVOID HANDLE, HKEY, *PHKEY;
+typedef INT NTSTATUS, POOL_TYPE;
+typedef LONG HRESULT;
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;
-typedef LONG HRESULT;
#define MAXUSHORT USHRT_MAX
Modified: trunk/reactos/tools/winebuild/res32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/res32.c?rev=37468&r1=37467&r2=37468&view=diff
==============================================================================
--- trunk/reactos/tools/winebuild/res32.c [iso-8859-1] (original)
+++ trunk/reactos/tools/winebuild/res32.c [iso-8859-1] Wed Nov 19 15:05:49 2008
@@ -207,7 +207,7 @@
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();
More information about the Ros-diffs
mailing list