From 25441f40f8c9e719b201caf7ad98b30b44c8e55e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 20 Jan 2012 15:14:31 +0100 Subject: [PATCH] include: Allow using windows.h in Wine code. --- dlls/windowscodecs/icnsformat.c | 24 ++++++++++++++++++++++++ include/aclapi.h | 4 +--- include/d3d8.h | 6 +----- include/d3d9.h | 6 +----- include/d3dtypes.h | 5 +---- include/dmplugin.h | 2 -- include/dmusicc.h | 2 -- include/dmusicf.h | 2 -- include/dmusici.h | 4 ---- include/dshow.h | 6 +----- include/mapidefs.h | 5 +---- include/oledlg.h | 4 +--- include/pdh.h | 6 +----- include/rpc.h | 10 +--------- include/sddl.h | 4 ++-- include/snmp.h | 6 +----- include/tapi.h | 4 +--- include/usp10.h | 4 +--- include/windows.h | 8 ++++---- include/winsock.h | 6 +----- 20 files changed, 43 insertions(+), 75 deletions(-) diff --git a/dlls/windowscodecs/icnsformat.c b/dlls/windowscodecs/icnsformat.c index de3871556bc..c77758175fc 100644 --- a/dlls/windowscodecs/icnsformat.c +++ b/dlls/windowscodecs/icnsformat.c @@ -25,6 +25,18 @@ #define GetCurrentProcess GetCurrentProcess_Mac #define GetCurrentThread GetCurrentThread_Mac #define LoadResource LoadResource_Mac +#define AnimatePalette AnimatePalette_Mac +#define EqualRgn EqualRgn_Mac +#define FillRgn FillRgn_Mac +#define FrameRgn FrameRgn_Mac +#define GetPixel GetPixel_Mac +#define InvertRgn InvertRgn_Mac +#define LineTo LineTo_Mac +#define OffsetRgn OffsetRgn_Mac +#define PaintRgn PaintRgn_Mac +#define Polygon Polygon_Mac +#define ResizePalette ResizePalette_Mac +#define SetRectRgn SetRectRgn_Mac #define EqualRect EqualRect_Mac #define FillRect FillRect_Mac #define FrameRect FrameRect_Mac @@ -40,6 +52,18 @@ #undef GetCurrentProcess #undef GetCurrentThread #undef LoadResource +#undef AnimatePalette +#undef EqualRgn +#undef FillRgn +#undef FrameRgn +#undef GetPixel +#undef InvertRgn +#undef LineTo +#undef OffsetRgn +#undef PaintRgn +#undef Polygon +#undef ResizePalette +#undef SetRectRgn #undef EqualRect #undef FillRect #undef FrameRect diff --git a/include/aclapi.h b/include/aclapi.h index 249cd03d6bc..cd818bcf016 100644 --- a/include/aclapi.h +++ b/include/aclapi.h @@ -19,9 +19,7 @@ #ifndef __WINE_ACLAPI_H #define __WINE_ACLAPI_H -#ifndef __WINESRC__ -# include -#endif +#include #include #ifdef __cplusplus diff --git a/include/d3d8.h b/include/d3d8.h index e98c3691b18..010ab831ac0 100644 --- a/include/d3d8.h +++ b/include/d3d8.h @@ -27,11 +27,7 @@ #define COM_NO_WINDOWS_H #include - -#ifndef __WINESRC__ -# include -#endif - +#include #include #include diff --git a/include/d3d9.h b/include/d3d9.h index 0ceb23fc6e4..e7636e5f5d4 100644 --- a/include/d3d9.h +++ b/include/d3d9.h @@ -28,11 +28,7 @@ #define COM_NO_WINDOWS_H #include - -#ifndef __WINESRC__ -# include -#endif - +#include #include #include diff --git a/include/d3dtypes.h b/include/d3dtypes.h index a4030e6149e..256d99a9a6e 100644 --- a/include/d3dtypes.h +++ b/include/d3dtypes.h @@ -25,10 +25,7 @@ #ifndef __WINE_D3DTYPES_H #define __WINE_D3DTYPES_H -#ifndef __WINESRC__ -# include -#endif - +#include #include #include diff --git a/include/dmplugin.h b/include/dmplugin.h index 6cf3114aebb..ccd9f6bd36b 100644 --- a/include/dmplugin.h +++ b/include/dmplugin.h @@ -21,9 +21,7 @@ #ifndef __WINE_DMUSIC_PLUGIN_H #define __WINE_DMUSIC_PLUGIN_H -#ifndef __WINESRC__ #include -#endif /* __WINESRC__ */ #define COM_NO_WINDOWS_H #include diff --git a/include/dmusicc.h b/include/dmusicc.h index 7aac00b177d..9c07737dfee 100644 --- a/include/dmusicc.h +++ b/include/dmusicc.h @@ -20,9 +20,7 @@ #ifndef __WINE_DMUSIC_CORE_H #define __WINE_DMUSIC_CORE_H -#ifndef __WINESRC__ #include -#endif /* __WINESRC__ */ #define COM_NO_WINDOWS_H #include diff --git a/include/dmusicf.h b/include/dmusicf.h index 6906ecc2675..bf488e563e6 100644 --- a/include/dmusicf.h +++ b/include/dmusicf.h @@ -21,9 +21,7 @@ #ifndef __WINE_DMUSIC_FILEFORMATS_H #define __WINE_DMUSIC_FILEFORMATS_H -#ifndef __WINESRC__ #include -#endif /* __WINESRC__ */ #define COM_NO_WINDOWS_H #include diff --git a/include/dmusici.h b/include/dmusici.h index 82a137b1fed..81fc3f8dbd6 100644 --- a/include/dmusici.h +++ b/include/dmusici.h @@ -21,11 +21,7 @@ #ifndef __WINE_DMUSIC_PERFORMANCE_H #define __WINE_DMUSIC_PERFORMANCE_H -#ifndef __WINESRC__ #include -#else -#include /* VARIANT */ -#endif /* __WINESRC__ */ #define COM_NO_WINDOWS_H #include diff --git a/include/dshow.h b/include/dshow.h index 34516096518..50e581c20cc 100644 --- a/include/dshow.h +++ b/include/dshow.h @@ -21,13 +21,9 @@ #define AM_NOVTABLE +#include #ifndef __WINESRC__ -# include # include -#else -# include -# include -# include #endif #include #include diff --git a/include/mapidefs.h b/include/mapidefs.h index cd6d8b081dd..2206e700e32 100644 --- a/include/mapidefs.h +++ b/include/mapidefs.h @@ -20,10 +20,7 @@ #ifndef MAPIDEFS_H #define MAPIDEFS_H -#ifndef __WINESRC__ -# include -#endif - +#include #include #include #include diff --git a/include/oledlg.h b/include/oledlg.h index 29f842ff972..f009d766234 100644 --- a/include/oledlg.h +++ b/include/oledlg.h @@ -21,9 +21,7 @@ #ifndef __WINE_OLEDLG_H #define __WINE_OLEDLG_H -#ifndef __WINESRC__ -# include -#endif +#include #include #include #include diff --git a/include/pdh.h b/include/pdh.h index 30591ac19ef..a25eb2e4fce 100644 --- a/include/pdh.h +++ b/include/pdh.h @@ -21,11 +21,7 @@ #ifndef _PDH_H_ #define _PDH_H_ -#ifdef __WINESRC__ -# include -#else -# include -#endif +#include #include #ifdef __cplusplus diff --git a/include/rpc.h b/include/rpc.h index 3e7e1293696..eb7d0417bd6 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -19,15 +19,7 @@ */ #ifndef RPC_NO_WINDOWS_H -# ifdef __WINESRC__ -# ifndef RC_INVOKED -# include -# endif -# include -# include -# else -# include -# endif +# include #endif #ifndef __WINE_RPC_H diff --git a/include/sddl.h b/include/sddl.h index 866b699d466..badd6fa8cbc 100644 --- a/include/sddl.h +++ b/include/sddl.h @@ -26,7 +26,7 @@ extern "C" { #define SDDL_REVISION_1 1 #define SDDL_REVISION SDDL_REVISION_1 -#ifndef __WINESRC__ +#ifndef WINE_NO_UNICODE_MACROS /* Component tags */ #ifndef UNICODE # define SDDL_OWNER "O" @@ -91,7 +91,7 @@ extern "C" { static const WCHAR SDDL_ACE_END[] = { ')',0 }; # endif #endif /* UNICODE */ -#endif /* __WINESRC__ */ +#endif /* WINE_NO_UNICODE_MACROS */ BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* ); BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* ); diff --git a/include/snmp.h b/include/snmp.h index cedf7b0acc0..0530fc66527 100644 --- a/include/snmp.h +++ b/include/snmp.h @@ -18,11 +18,7 @@ #ifndef _WINE_SNMP_H #define _WINE_SNMP_H -#ifndef __WINESRC__ -# include -#else -# include -#endif +#include #include diff --git a/include/tapi.h b/include/tapi.h index 564b118483a..9af7ea53f71 100644 --- a/include/tapi.h +++ b/include/tapi.h @@ -21,9 +21,7 @@ #ifndef __WINE_TAPI_H #define __WINE_TAPI_H -#ifndef __WINESRC__ -# include -#endif +#include #include #include diff --git a/include/usp10.h b/include/usp10.h index e84eeb73823..09416aefe06 100644 --- a/include/usp10.h +++ b/include/usp10.h @@ -20,9 +20,7 @@ #ifndef __USP10_H #define __USP10_H -#ifndef __WINESRC__ -# include -#endif +#include /* FIXME: #include */ #ifdef __cplusplus diff --git a/include/windows.h b/include/windows.h index 14f6ce9be93..ec5c6a20028 100644 --- a/include/windows.h +++ b/include/windows.h @@ -19,10 +19,6 @@ #ifndef __WINE_WINDOWS_H #define __WINE_WINDOWS_H -#ifdef __WINESRC__ -#error Wine should not include windows.h internally -#endif - #if defined(_MSC_VER) && (_MSC_VER >= 800) && !defined(__cplusplus) /* TYPE_ALIGNMENT generates this - move it outside the warning push/pop scope. */ # pragma warning(disable:4116) @@ -49,6 +45,8 @@ #include /* Not so essential ones */ +#ifndef __WINESRC__ + #ifndef WIN32_LEAN_AND_MEAN #include @@ -102,6 +100,8 @@ #include #endif /* !NOIMM */ +#endif /* __WINESRC__ */ + #endif /* RC_INVOKED && !NOWINRES */ #endif /* _INC_WINDOWS */ #endif /* __WINE_WINDOWS_H */ diff --git a/include/winsock.h b/include/winsock.h index a938d5930c2..06e6309fd86 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -107,11 +107,7 @@ #endif /* __WINE_WINSOCKAPI_STDLIB_H */ -#ifndef __WINESRC__ -# include -#else -# include -#endif +#include #ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ -- 2.11.4.GIT