Commit 25441f40 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Allow using windows.h in Wine code.

parent 0c0b6a10
...@@ -25,6 +25,18 @@ ...@@ -25,6 +25,18 @@
#define GetCurrentProcess GetCurrentProcess_Mac #define GetCurrentProcess GetCurrentProcess_Mac
#define GetCurrentThread GetCurrentThread_Mac #define GetCurrentThread GetCurrentThread_Mac
#define LoadResource LoadResource_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 EqualRect EqualRect_Mac
#define FillRect FillRect_Mac #define FillRect FillRect_Mac
#define FrameRect FrameRect_Mac #define FrameRect FrameRect_Mac
...@@ -40,6 +52,18 @@ ...@@ -40,6 +52,18 @@
#undef GetCurrentProcess #undef GetCurrentProcess
#undef GetCurrentThread #undef GetCurrentThread
#undef LoadResource #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 EqualRect
#undef FillRect #undef FillRect
#undef FrameRect #undef FrameRect
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#ifndef __WINE_ACLAPI_H #ifndef __WINE_ACLAPI_H
#define __WINE_ACLAPI_H #define __WINE_ACLAPI_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
#include <accctrl.h> #include <accctrl.h>
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -27,11 +27,7 @@ ...@@ -27,11 +27,7 @@
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
#include <windows.h>
#ifndef __WINESRC__
# include <windows.h>
#endif
#include <d3d8types.h> #include <d3d8types.h>
#include <d3d8caps.h> #include <d3d8caps.h>
......
...@@ -28,11 +28,7 @@ ...@@ -28,11 +28,7 @@
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
#include <windows.h>
#ifndef __WINESRC__
# include <windows.h>
#endif
#include <d3d9types.h> #include <d3d9types.h>
#include <d3d9caps.h> #include <d3d9caps.h>
......
...@@ -25,10 +25,7 @@ ...@@ -25,10 +25,7 @@
#ifndef __WINE_D3DTYPES_H #ifndef __WINE_D3DTYPES_H
#define __WINE_D3DTYPES_H #define __WINE_D3DTYPES_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
#include <float.h> #include <float.h>
#include <ddraw.h> #include <ddraw.h>
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#ifndef __WINE_DMUSIC_PLUGIN_H #ifndef __WINE_DMUSIC_PLUGIN_H
#define __WINE_DMUSIC_PLUGIN_H #define __WINE_DMUSIC_PLUGIN_H
#ifndef __WINESRC__
#include <windows.h> #include <windows.h>
#endif /* __WINESRC__ */
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#ifndef __WINE_DMUSIC_CORE_H #ifndef __WINE_DMUSIC_CORE_H
#define __WINE_DMUSIC_CORE_H #define __WINE_DMUSIC_CORE_H
#ifndef __WINESRC__
#include <windows.h> #include <windows.h>
#endif /* __WINESRC__ */
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#ifndef __WINE_DMUSIC_FILEFORMATS_H #ifndef __WINE_DMUSIC_FILEFORMATS_H
#define __WINE_DMUSIC_FILEFORMATS_H #define __WINE_DMUSIC_FILEFORMATS_H
#ifndef __WINESRC__
#include <windows.h> #include <windows.h>
#endif /* __WINESRC__ */
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
......
...@@ -21,11 +21,7 @@ ...@@ -21,11 +21,7 @@
#ifndef __WINE_DMUSIC_PERFORMANCE_H #ifndef __WINE_DMUSIC_PERFORMANCE_H
#define __WINE_DMUSIC_PERFORMANCE_H #define __WINE_DMUSIC_PERFORMANCE_H
#ifndef __WINESRC__
#include <windows.h> #include <windows.h>
#else
#include <oleauto.h> /* VARIANT */
#endif /* __WINESRC__ */
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <objbase.h> #include <objbase.h>
......
...@@ -21,13 +21,9 @@ ...@@ -21,13 +21,9 @@
#define AM_NOVTABLE #define AM_NOVTABLE
#include <windows.h>
#ifndef __WINESRC__ #ifndef __WINESRC__
# include <windows.h>
# include <windowsx.h> # include <windowsx.h>
#else
# include <windef.h>
# include <wingdi.h>
# include <objbase.h>
#endif #endif
#include <olectl.h> #include <olectl.h>
#include <ddraw.h> #include <ddraw.h>
......
...@@ -20,10 +20,7 @@ ...@@ -20,10 +20,7 @@
#ifndef MAPIDEFS_H #ifndef MAPIDEFS_H
#define MAPIDEFS_H #define MAPIDEFS_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
#include <winerror.h> #include <winerror.h>
#include <objbase.h> #include <objbase.h>
#include <stddef.h> #include <stddef.h>
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#ifndef __WINE_OLEDLG_H #ifndef __WINE_OLEDLG_H
#define __WINE_OLEDLG_H #define __WINE_OLEDLG_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
#include <shellapi.h> #include <shellapi.h>
#include <commdlg.h> #include <commdlg.h>
#include <ole2.h> #include <ole2.h>
......
...@@ -21,11 +21,7 @@ ...@@ -21,11 +21,7 @@
#ifndef _PDH_H_ #ifndef _PDH_H_
#define _PDH_H_ #define _PDH_H_
#ifdef __WINESRC__ #include <windows.h>
# include <windef.h>
#else
# include <windows.h>
#endif
#include <winperf.h> #include <winperf.h>
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -19,15 +19,7 @@ ...@@ -19,15 +19,7 @@
*/ */
#ifndef RPC_NO_WINDOWS_H #ifndef RPC_NO_WINDOWS_H
# ifdef __WINESRC__
# ifndef RC_INVOKED
# include <stdarg.h>
# endif
# include <windef.h>
# include <winbase.h>
# else
# include <windows.h> # include <windows.h>
# endif
#endif #endif
#ifndef __WINE_RPC_H #ifndef __WINE_RPC_H
......
...@@ -26,7 +26,7 @@ extern "C" { ...@@ -26,7 +26,7 @@ extern "C" {
#define SDDL_REVISION_1 1 #define SDDL_REVISION_1 1
#define SDDL_REVISION SDDL_REVISION_1 #define SDDL_REVISION SDDL_REVISION_1
#ifndef __WINESRC__ #ifndef WINE_NO_UNICODE_MACROS
/* Component tags */ /* Component tags */
#ifndef UNICODE #ifndef UNICODE
# define SDDL_OWNER "O" # define SDDL_OWNER "O"
...@@ -91,7 +91,7 @@ extern "C" { ...@@ -91,7 +91,7 @@ extern "C" {
static const WCHAR SDDL_ACE_END[] = { ')',0 }; static const WCHAR SDDL_ACE_END[] = { ')',0 };
# endif # endif
#endif /* UNICODE */ #endif /* UNICODE */
#endif /* __WINESRC__ */ #endif /* WINE_NO_UNICODE_MACROS */
BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* ); BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* );
BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* ); BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* );
......
...@@ -18,11 +18,7 @@ ...@@ -18,11 +18,7 @@
#ifndef _WINE_SNMP_H #ifndef _WINE_SNMP_H
#define _WINE_SNMP_H #define _WINE_SNMP_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#else
# include <windef.h>
#endif
#include <pshpack4.h> #include <pshpack4.h>
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#ifndef __WINE_TAPI_H #ifndef __WINE_TAPI_H
#define __WINE_TAPI_H #define __WINE_TAPI_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
#include <basetsd.h> #include <basetsd.h>
#include <oaidl.h> #include <oaidl.h>
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#ifndef __USP10_H #ifndef __USP10_H
#define __USP10_H #define __USP10_H
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#endif
/* FIXME: #include <specstrings.h> */ /* FIXME: #include <specstrings.h> */
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
#ifndef __WINE_WINDOWS_H #ifndef __WINE_WINDOWS_H
#define __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) #if defined(_MSC_VER) && (_MSC_VER >= 800) && !defined(__cplusplus)
/* TYPE_ALIGNMENT generates this - move it outside the warning push/pop scope. */ /* TYPE_ALIGNMENT generates this - move it outside the warning push/pop scope. */
# pragma warning(disable:4116) # pragma warning(disable:4116)
...@@ -49,6 +45,8 @@ ...@@ -49,6 +45,8 @@
#include <winnetwk.h> #include <winnetwk.h>
/* Not so essential ones */ /* Not so essential ones */
#ifndef __WINESRC__
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h> #include <cderr.h>
...@@ -102,6 +100,8 @@ ...@@ -102,6 +100,8 @@
#include <imm.h> #include <imm.h>
#endif /* !NOIMM */ #endif /* !NOIMM */
#endif /* __WINESRC__ */
#endif /* RC_INVOKED && !NOWINRES */ #endif /* RC_INVOKED && !NOWINRES */
#endif /* _INC_WINDOWS */ #endif /* _INC_WINDOWS */
#endif /* __WINE_WINDOWS_H */ #endif /* __WINE_WINDOWS_H */
...@@ -107,11 +107,7 @@ ...@@ -107,11 +107,7 @@
#endif /* __WINE_WINSOCKAPI_STDLIB_H */ #endif /* __WINE_WINSOCKAPI_STDLIB_H */
#ifndef __WINESRC__ #include <windows.h>
# include <windows.h>
#else
# include <windef.h>
#endif
#ifndef _WINSOCKAPI_ #ifndef _WINSOCKAPI_
#define _WINSOCKAPI_ #define _WINSOCKAPI_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment