From 32072cfccdcb3d4721b5c4bdb19554fdfdeee4fc Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Fri, 7 Aug 2009 15:25:03 +0000 Subject: [PATCH] added include/reactos/wine/typeof.h Simulate typeof operator for the Wine code that requires it modified ReactOS-generic.rbuild Force-include typeof.h when compiling with Visual C++ svn path=/trunk/; revision=42469 --- reactos/ReactOS-generic.rbuild | 1 + reactos/include/reactos/wine/typeof.h | 56 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 reactos/include/reactos/wine/typeof.h diff --git a/reactos/ReactOS-generic.rbuild b/reactos/ReactOS-generic.rbuild index 86d3a2df237..b073b87f5d8 100644 --- a/reactos/ReactOS-generic.rbuild +++ b/reactos/ReactOS-generic.rbuild @@ -99,6 +99,7 @@ /Zl /Zi /W1 + /FItypeof.h diff --git a/reactos/include/reactos/wine/typeof.h b/reactos/include/reactos/wine/typeof.h new file mode 100644 index 00000000000..f2df41505fd --- /dev/null +++ b/reactos/include/reactos/wine/typeof.h @@ -0,0 +1,56 @@ +#define typeof(X_) __typeof_ ## X_ + +#ifdef _WIN64 +#define __typeof_intptr long long +#define __typeof_longptr long long +#else +#define __typeof_intptr int +#define __typeof_longptr long +#endif + +#ifdef __cplusplus +#define __typeof_size size_t +#define __typeof_wchar wchar_t +#else +#define __typeof_size __typeof_intptr +#define __typeof_wchar unsigned short +#endif + +typedef struct IWineD3D * (__stdcall typeof(WineDirect3DCreate))(unsigned int, struct IUnknown *); +typedef struct IWineD3DClipper * (__stdcall typeof(WineDirect3DCreateClipper))(struct IUnknown *); +typedef int (__stdcall typeof(ImeInquire))(struct _tagIMEINFO *, __typeof_wchar *, const __typeof_wchar *); +typedef int (__stdcall typeof(ImeConfigure))(void *, void *, unsigned int, void *); +typedef int (__stdcall typeof(ImeDestroy))(unsigned int); +typedef __typeof_longptr (__stdcall typeof(ImeEscape))(void *, unsigned int, void *); +typedef int (__stdcall typeof(ImeSelect))(void *, int); +typedef int (__stdcall typeof(ImeSetActiveContext))(void *, int); +typedef unsigned int (__stdcall typeof(ImeToAsciiEx))(unsigned int, unsigned int, unsigned char *, unsigned int *, unsigned int, void *); +typedef int (__stdcall typeof(NotifyIME))(void *, unsigned int, unsigned int, unsigned int); +typedef int (__stdcall typeof(ImeRegisterWord))(const __typeof_wchar *, unsigned int, const __typeof_wchar *); +typedef int (__stdcall typeof(ImeUnregisterWord))(const __typeof_wchar *, unsigned int, const __typeof_wchar *); +typedef unsigned int (__stdcall typeof(ImeGetRegisterWordStyle))(unsigned int, struct tagSTYLEBUFW *); +typedef unsigned int (__stdcall typeof(ImeEnumRegisterWord))(int (__stdcall *)(const __typeof_wchar *, unsigned int, const __typeof_wchar *, void *), const __typeof_wchar *, unsigned int, const __typeof_wchar *, void *); +typedef int (__stdcall typeof(ImeSetCompositionString))(void *, unsigned int, const void *, unsigned int, const void *, unsigned int); +typedef unsigned int (__stdcall typeof(ImeConversionList))(void *, const __typeof_wchar *, struct tagCANDIDATELIST *, unsigned int, unsigned int); +typedef int (__stdcall typeof(ImeProcessKey))(void *, unsigned int, __typeof_longptr, unsigned char *); +typedef unsigned int (__stdcall typeof(ImeGetRegisterWordStyle))(unsigned int, struct tagSTYLEBUFW *); +typedef unsigned int (__stdcall typeof(ImeGetImeMenuItems))(void *, unsigned int, unsigned int, struct tagIMEMENUITEMINFOW *, struct tagIMEMENUITEMINFOW *, unsigned int); +typedef struct _xmlDoc * (__cdecl typeof(xsltApplyStylesheet))(struct _xsltStylesheet *, struct _xmlDoc *, const char **); +typedef void (__cdecl typeof(xsltCleanupGlobals))(void); +typedef void (__cdecl typeof(xsltFreeStylesheet))(struct _xsltStylesheet *); +typedef struct _xsltStylesheet * (__cdecl typeof(xsltParseStylesheetDoc))(struct _xmlDoc *); +typedef struct jpeg_error_mgr * (__cdecl typeof(jpeg_std_error))(struct jpeg_error_mgr *); +typedef void (__cdecl typeof(jpeg_CreateDecompress))(struct jpeg_decompress_struct *, int, __typeof_size); +typedef int (__cdecl typeof(jpeg_read_header))(struct jpeg_decompress_struct *, int); +typedef int (__cdecl typeof(jpeg_start_decompress))(struct jpeg_decompress_struct *); +typedef unsigned int (__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *, unsigned char **, unsigned int); +typedef int (__cdecl typeof(jpeg_finish_decompress))(struct jpeg_decompress_struct *); +typedef void (__cdecl typeof(jpeg_destroy_decompress))(struct jpeg_decompress_struct *); + +#undef __typeof_intptr +#undef __typeof_longptr +#undef __typeof_wchar +#undef __typeof_size + +/* EOF */ +