diff --git a/include/basetsd.h b/include/basetsd.h index 9b71d404534..81ada05ff5b 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -44,7 +44,7 @@ extern "C" { * simply add to the command line: * -D__int8=char -D__int16=short -D__int32=int "-D__int64=long long" */ -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__WIDL__) # ifndef __int8 # define __int8 char # endif @@ -59,17 +59,17 @@ extern "C" { # endif #endif /* !defined(_MSC_VER) */ -typedef signed __int8 INT8, *PINT8; -typedef signed __int16 INT16, *PINT16; -typedef signed __int32 INT32, *PINT32; +typedef signed char INT8, *PINT8; +typedef signed short INT16, *PINT16; +typedef signed int INT32, *PINT32; typedef signed __int64 INT64, *PINT64; -typedef unsigned __int8 UINT8, *PUINT8; -typedef unsigned __int16 UINT16, *PUINT16; -typedef unsigned __int32 UINT32, *PUINT32; +typedef unsigned char UINT8, *PUINT8; +typedef unsigned short UINT16, *PUINT16; +typedef unsigned int UINT32, *PUINT32; typedef unsigned __int64 UINT64, *PUINT64; -typedef signed __int32 LONG32, *PLONG32; -typedef unsigned __int32 ULONG32, *PULONG32; -typedef unsigned __int32 DWORD32, *PDWORD32; +typedef signed int LONG32, *PLONG32; +typedef unsigned int ULONG32, *PULONG32; +typedef unsigned int DWORD32, *PDWORD32; typedef signed __int64 LONG64, *PLONG64; typedef unsigned __int64 ULONG64, *PULONG64; typedef unsigned __int64 DWORD64, *PDWORD64; @@ -88,8 +88,8 @@ typedef unsigned __int64 DWORD_PTR, *PDWORD_PTR; #define MININT_PTR 0x8000000000000000 #define MAXUINT_PTR 0xffffffffffffffff -typedef signed __int32 HALF_PTR, *PHALF_PTR; -typedef unsigned __int32 UHALF_PTR, *PUHALF_PTR; +typedef int HALF_PTR, *PHALF_PTR; +typedef unsigned int UHALF_PTR, *PUHALF_PTR; #define MAXHALF_PTR 0x7fffffff #define MINHALF_PTR 0x80000000 @@ -97,9 +97,9 @@ typedef unsigned __int32 UHALF_PTR, *PUHALF_PTR; #else /* FIXME: defined(_WIN32) */ -typedef signed __int32 INT_PTR, *PINT_PTR; +typedef int INT_PTR, *PINT_PTR; typedef long LONG_PTR, *PLONG_PTR; -typedef unsigned __int32 UINT_PTR, *PUINT_PTR; +typedef unsigned int UINT_PTR, *PUINT_PTR; typedef unsigned long ULONG_PTR, *PULONG_PTR; typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; @@ -107,8 +107,8 @@ typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; #define MININT_PTR 0x80000000 #define MAXUINT_PTR 0xffffffff -typedef signed __int16 HALF_PTR, *PHALF_PTR; -typedef unsigned __int16 UHALF_PTR, *PUHALF_PTR; +typedef signed short HALF_PTR, *PHALF_PTR; +typedef unsigned short UHALF_PTR, *PUHALF_PTR; #define MAXUHALF_PTR 0xffff #define MAXHALF_PTR 0x7fff @@ -139,7 +139,7 @@ typedef ULONG_PTR SIZE_T, *PSIZE_T; # define WORDS_LITTLEENDIAN # define BITFIELDS_LITTLEENDIAN # undef ALLOW_UNALIGNED_ACCESS -#elif !defined(RC_INVOKED) +#elif !defined(RC_INVOKED) && !defined(__WIDL__) # error Unknown CPU architecture! #endif diff --git a/include/wtypes.h b/include/wtypes.h index 8a5e48ae060..2d71282b4a5 100644 --- a/include/wtypes.h +++ b/include/wtypes.h @@ -36,12 +36,6 @@ typedef float FLOAT; typedef double DOUBLE; -typedef long LONG_PTR, *PLONG_PTR; - -typedef unsigned int UINT_PTR, *PUINT_PTR; - -typedef unsigned long ULONG_PTR, *PULONG_PTR; - typedef void *PVOID, *LPVOID; typedef char CHAR; @@ -579,31 +573,6 @@ unsigned char * __RPC_USER HMETAFILEPICT_UserMarshal (unsigned long *, unsigned unsigned char * __RPC_USER HMETAFILEPICT_UserUnmarshal(unsigned long *, unsigned char *, HMETAFILEPICT *); void __RPC_USER HMETAFILEPICT_UserFree (unsigned long *, HMETAFILEPICT *); -#ifndef GUID_DEFINED -#define GUID_DEFINED -typedef struct _GUID { - DWORD Data1; - WORD Data2; - WORD Data3; - BYTE Data4[8]; -} GUID; - -#endif -#if 0 /* guiddef.h */ -typedef GUID *LPGUID; - -typedef GUID IID; - -typedef IID *LPIID; - -typedef GUID CLSID; - -typedef CLSID *LPCLSID; - -typedef GUID FMTID; - -typedef FMTID *LPFMTID; - #if 0 typedef GUID *REFGUID; @@ -614,7 +583,6 @@ typedef CLSID *REFCLSID; typedef FMTID *REFFMTID; #endif -#endif /* guiddef.h */ typedef enum tagDVASPECT { DVASPECT_CONTENT = 1, DVASPECT_THUMBNAIL = 2, diff --git a/include/wtypes.idl b/include/wtypes.idl index 2c6fbe8b564..e43a310cfc2 100644 --- a/include/wtypes.idl +++ b/include/wtypes.idl @@ -18,19 +18,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +import "basetsd.h"; +import "guiddef.h"; + [ uuid(D3980A60-910C-1068-9341-00DD010F2F1C), version(0.1), pointer_default(unique) ] + interface IWinTypes { -/******************** WINE STUFF ********************/ - -cpp_quote("#include \"basetsd.h\"") -cpp_quote("#include \"guiddef.h\"") - /******************** BASIC WIN32 TYPES ********************/ cpp_quote("#if 0 /* winnt.h */") /* don't redefine these */ @@ -48,11 +47,6 @@ typedef unsigned long ULONG; typedef float FLOAT; typedef double DOUBLE; -/* FIXME: This is wrong for WIN64 */ -typedef long LONG_PTR, *PLONG_PTR; -typedef unsigned int UINT_PTR, *PUINT_PTR; -typedef unsigned long ULONG_PTR, *PULONG_PTR; - typedef void *PVOID, *LPVOID; typedef char CHAR; @@ -533,28 +527,6 @@ DECLARE_WIREM_HANDLE(HMETAFILEPICT); /******************** GUID TYPES ********************/ -cpp_quote("#ifndef GUID_DEFINED") -cpp_quote("#define GUID_DEFINED") -typedef struct _GUID { - DWORD Data1; - WORD Data2; - WORD Data3; - BYTE Data4[8]; -} GUID; -cpp_quote("#endif") - -cpp_quote("#if 0 /* guiddef.h */") -typedef GUID *LPGUID; - -typedef GUID IID; -typedef IID *LPIID; - -typedef GUID CLSID; -typedef CLSID *LPCLSID; - -typedef GUID FMTID; -typedef FMTID *LPFMTID; - cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */ typedef GUID *REFGUID; typedef IID *REFIID; @@ -562,8 +534,6 @@ typedef CLSID *REFCLSID; typedef FMTID *REFFMTID; cpp_quote("#endif") -cpp_quote("#endif /* guiddef.h */") - /******************** MISC TYPES ********************/ typedef enum tagDVASPECT {