Optimized include/*.h: (recursively) include all headers needed by
this .h file, but only those. Necessary fixes to a lot of .c files,
started optimizing "windows.h" away from some of them. Moved
GetCurrentTask prototype to wine/winbase16.h.
diff --git a/include/button.h b/include/button.h
index 64c1c08..377f1b2 100644
--- a/include/button.h
+++ b/include/button.h
@@ -7,7 +7,7 @@
#ifndef __WINE_BUTTON_H
#define __WINE_BUTTON_H
-#include "windows.h"
+#include "wingdi.h"
/* Extra info for BUTTON windows */
/* Note: under MS-Windows, state is a BYTE and this structure is */
diff --git a/include/cdrom.h b/include/cdrom.h
index caeb817..0c34054 100644
--- a/include/cdrom.h
+++ b/include/cdrom.h
@@ -6,13 +6,13 @@
* Copyright 1999 Eric Pouech
*/
-#include <stdlib.h>
-#include <unistd.h>
-#include "winbase.h"
-
#ifndef __WINE_CDROM_H__
#define __WINE_CDROM_H__
+#include <stdlib.h>
+#include <unistd.h>
+#include "wintypes.h"
+
#ifdef HAVE_LINUX_CDROM_H
# include <linux/cdrom.h>
#endif
diff --git a/include/class.h b/include/class.h
index 32dc589..8d4ade6 100644
--- a/include/class.h
+++ b/include/class.h
@@ -7,7 +7,7 @@
#ifndef __WINE_CLASS_H
#define __WINE_CLASS_H
-#include "windows.h"
+#include "wintypes.h"
#include "winproc.h"
#define CLASS_MAGIC ('C' | ('L' << 8) | ('A' << 16) | ('S' << 24))
diff --git a/include/console.h b/include/console.h
index 6746a18..6b5e4a9 100644
--- a/include/console.h
+++ b/include/console.h
@@ -9,7 +9,6 @@
#define CONSOLE_H
#include <stdio.h>
-
#include "config.h"
/* Can we compile with curses/ncurses? */
diff --git a/include/cursoricon.h b/include/cursoricon.h
index 24fc398..92d5c70 100644
--- a/include/cursoricon.h
+++ b/include/cursoricon.h
@@ -7,7 +7,7 @@
#ifndef __WINE_CURSORICON_H
#define __WINE_CURSORICON_H
-#include "windows.h"
+#include "wingdi.h"
#pragma pack(1)
diff --git a/include/dce.h b/include/dce.h
index 089ad22..506bfed 100644
--- a/include/dce.h
+++ b/include/dce.h
@@ -7,7 +7,6 @@
#ifndef __WINE_DCE_H
#define __WINE_DCE_H
-#include "windows.h"
#include "win.h"
/* additional DCX flags
diff --git a/include/ddraw.h b/include/ddraw.h
index 63c148a..fb973c4 100644
--- a/include/ddraw.h
+++ b/include/ddraw.h
@@ -6,6 +6,8 @@
#include <X11/extensions/XShm.h>
#endif /* defined(HAVE_LIBXXSHM) */
+#include "winbase.h" /* LARGE_INTEGER ... */
+#include "wingdi.h" /* PALETTE stuff ... */
#include "wine/obj_base.h"
#ifndef DIRECTDRAW_VERSION
diff --git a/include/debugger.h b/include/debugger.h
index c490e9d..ec12229 100644
--- a/include/debugger.h
+++ b/include/debugger.h
@@ -7,10 +7,9 @@
#ifndef __WINE_DEBUGGER_H
#define __WINE_DEBUGGER_H
-#include "winnt.h"
-#include "selectors.h"
+#include <sys/types.h> /* u_long ... */
+#include "wintypes.h"
#include "sig_context.h"
-#include "pe_image.h"
#include "miscemu.h"
#define STEP_FLAG 0x100 /* single step flag */
diff --git a/include/desktop.h b/include/desktop.h
index 21e7e6e..fa49ffa 100644
--- a/include/desktop.h
+++ b/include/desktop.h
@@ -7,7 +7,7 @@
#ifndef __WINE_DESKTOP_H
#define __WINE_DESKTOP_H
-#include "windows.h"
+#include "wintypes.h"
struct tagMONITOR;
diff --git a/include/dialog.h b/include/dialog.h
index ac3a14d..fae9c9b 100644
--- a/include/dialog.h
+++ b/include/dialog.h
@@ -7,7 +7,6 @@
#ifndef __WINE_DIALOG_H
#define __WINE_DIALOG_H
-#include "windows.h"
#include "winproc.h"
/* Dialog info structure.
diff --git a/include/dinput.h b/include/dinput.h
index b9c0f77..3a5a7ad 100644
--- a/include/dinput.h
+++ b/include/dinput.h
@@ -1,9 +1,10 @@
#ifndef _WINE_DINPUT_H
#define _WINE_DINPUT_H
+#include "windef.h" /* for MAX_PATH */
+#include "wintypes.h"
#include "unknwn.h"
#include "mouse.h"
-#include "windef.h" /* for MAX_PATH */
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
diff --git a/include/dosexe.h b/include/dosexe.h
index 9da2437..1b18ab8 100644
--- a/include/dosexe.h
+++ b/include/dosexe.h
@@ -7,11 +7,9 @@
#ifndef __WINE_DOSEXE_H
#define __WINE_DOSEXE_H
-#include <sys/types.h>
-#include "windows.h"
-#include "winnt.h"
-#include "sig_context.h"
+#include <sys/types.h> /* pid_t */
#include "wintypes.h"
+#include "sig_context.h"
typedef struct _DOSTASK {
LPVOID img;
diff --git a/include/dsound.h b/include/dsound.h
index eb16712..fd7ab96 100644
--- a/include/dsound.h
+++ b/include/dsound.h
@@ -1,8 +1,7 @@
#ifndef __WINE_DSOUND_H
#define __WINE_DSOUND_H
-#include "windows.h"
-#include "winbase.h"
+#include "wintypes.h"
#include "mmsystem.h"
#include "d3d.h" /*FIXME: Need to break out d3dtypes.h */
diff --git a/include/file.h b/include/file.h
index f188291..a38ae07 100644
--- a/include/file.h
+++ b/include/file.h
@@ -7,8 +7,7 @@
#ifndef __WINE_FILE_H
#define __WINE_FILE_H
-#include <time.h>
-#include "windows.h"
+#include <time.h> /* time_t */
#include "k32obj.h"
#define MAX_PATHNAME_LEN 1024
diff --git a/include/gdi.h b/include/gdi.h
index 8b2c379..5910cd6 100644
--- a/include/gdi.h
+++ b/include/gdi.h
@@ -7,7 +7,8 @@
#ifndef __WINE_GDI_H
#define __WINE_GDI_H
-#include "windows.h"
+#include "wintypes.h"
+#include "wingdi.h"
#include "ldt.h"
#include "local.h"
#include "path.h"
diff --git a/include/heap.h b/include/heap.h
index 84f6dc2..5700d1d 100644
--- a/include/heap.h
+++ b/include/heap.h
@@ -8,7 +8,6 @@
#define __WINE_HEAP_H
#include "winbase.h"
-#include "winnt.h"
extern HANDLE32 SystemHeap;
extern HANDLE32 SegptrHeap;
diff --git a/include/hook.h b/include/hook.h
index fcf3fc7..9d53a11 100644
--- a/include/hook.h
+++ b/include/hook.h
@@ -7,7 +7,7 @@
#ifndef __WINE_HOOK_H
#define __WINE_HOOK_H
-#include "windows.h"
+#include "wintypes.h"
#define HOOK_WIN16 0x00
#define HOOK_WIN32A 0x01
diff --git a/include/imagehlp.h b/include/imagehlp.h
index 34949b2..53897be 100644
--- a/include/imagehlp.h
+++ b/include/imagehlp.h
@@ -5,9 +5,9 @@
#ifndef __WINE_IMAGEHLP_H
#define __WINE_IMAGEHLP_H
-#include "toolhelp.h"
-#include "winnt.h"
#include "wintypes.h"
+#include "windef.h"
+#include "winbase.h"
/***********************************************************************
* Types
diff --git a/include/imagelist.h b/include/imagelist.h
index e20e4ab..7db2bfa 100644
--- a/include/imagelist.h
+++ b/include/imagelist.h
@@ -8,7 +8,7 @@
#define __WINE_IMAGELIST_H
#include "wingdi.h"
-
+
struct _IMAGELIST
{
HBITMAP32 hbmImage;
diff --git a/include/ipaddress.h b/include/ipaddress.h
index 20e0e39..1c2a336 100644
--- a/include/ipaddress.h
+++ b/include/ipaddress.h
@@ -8,10 +8,6 @@
#ifndef __WINE_IPADDRESS_H
#define __WINE_IPADDRESS_H
-#include "win.h"
-
-
-
typedef struct tagIPADDRESS_INFO
{
BYTE LowerLimit[4];
diff --git a/include/k32obj.h b/include/k32obj.h
index 281b3ed..5294144 100644
--- a/include/k32obj.h
+++ b/include/k32obj.h
@@ -8,7 +8,7 @@
#define __WINE_K32OBJ_H
#include "wintypes.h"
-#include "windows.h"
+#include "winbase.h" /* SECURITY_ATTRIBUTES */
/* Object types */
typedef enum
diff --git a/include/libres.h b/include/libres.h
index d70ef87..6b1e57d 100644
--- a/include/libres.h
+++ b/include/libres.h
@@ -5,7 +5,6 @@
#define __WINE_LIBRES_H
#include "wintypes.h"
-#include "resource.h"
extern HRSRC32 LIBRES_FindResource( HINSTANCE32 hModule, LPCWSTR name, LPCWSTR type );
extern HGLOBAL32 LIBRES_LoadResource( HINSTANCE32 hModule, HRSRC32 hRsrc );
diff --git a/include/lzexpand.h b/include/lzexpand.h
index fb605ab..e3198fb 100644
--- a/include/lzexpand.h
+++ b/include/lzexpand.h
@@ -7,7 +7,7 @@
#ifndef __WINE_LZEXPAND_H
#define __WINE_LZEXPAND_H
-#include "winbase.h"
+#include "wintypes.h"
#define LZERROR_BADINHANDLE -1 /* -1 */
#define LZERROR_BADOUTHANDLE -2 /* -2 */
diff --git a/include/mdi.h b/include/mdi.h
index b66a516..074d458 100644
--- a/include/mdi.h
+++ b/include/mdi.h
@@ -9,7 +9,7 @@
#ifndef __WINE_MDI_H
#define __WINE_MDI_H
-#include "windows.h"
+#include "wintypes.h"
#define MDI_MAXLISTLENGTH 0x40
#define MDI_MAXTITLELENGTH 0xA1
diff --git a/include/message.h b/include/message.h
index 0a6b7ad..63b3259 100644
--- a/include/message.h
+++ b/include/message.h
@@ -9,7 +9,6 @@
#include "win.h"
#include "queue.h"
-#include "wintypes.h"
extern DWORD MSG_WineStartTicks; /* Ticks at Wine startup */
diff --git a/include/metafile.h b/include/metafile.h
index c674718..f334465 100644
--- a/include/metafile.h
+++ b/include/metafile.h
@@ -7,7 +7,8 @@
#ifndef __WINE_METAFILE_H
#define __WINE_METAFILE_H
-#include "windows.h"
+#include "wingdi.h"
+#include "gdi.h"
#define MFHEADERSIZE (sizeof(METAHEADER))
#define MFVERSION 0x300
diff --git a/include/metafiledrv.h b/include/metafiledrv.h
index d62f422..9686516 100644
--- a/include/metafiledrv.h
+++ b/include/metafiledrv.h
@@ -5,7 +5,7 @@
#ifndef __WINE_METAFILEDRV_H
#define __WINE_METAFILEDRV_H
-#include "windows.h"
+#include "wingdi.h"
#include "gdi.h"
/* FIXME: SDK docs says these should be 1 and 2 */
diff --git a/include/miscemu.h b/include/miscemu.h
index 49992a6..d7a1846 100644
--- a/include/miscemu.h
+++ b/include/miscemu.h
@@ -7,7 +7,6 @@
#ifndef __WINE_MISCEMU_H
#define __WINE_MISCEMU_H
-#include <stdio.h>
#include "winnt.h"
#include "ldt.h"
diff --git a/include/mmreg.h b/include/mmreg.h
index b54994b..d39bfd8 100644
--- a/include/mmreg.h
+++ b/include/mmreg.h
@@ -2,7 +2,6 @@
* mmreg.h - Declarations for ???
*/
-#include "wintypes.h"
/***********************************************************************
* Defines/Enums
@@ -11,6 +10,8 @@
#ifndef _ACM_WAVEFILTER
#define _ACM_WAVEFILTER
+#include "wintypes.h"
+
#define WAVE_FILTER_UNKNOWN 0x0000
#define WAVE_FILTER_DEVELOPMENT 0xFFFF
diff --git a/include/module.h b/include/module.h
index a851e71..5589422 100644
--- a/include/module.h
+++ b/include/module.h
@@ -7,9 +7,9 @@
#ifndef __WINE_MODULE_H
#define __WINE_MODULE_H
+#include "wintypes.h"
#include "dosexe.h"
#include "pe_image.h"
-#include "wintypes.h"
/* In-memory module structure. See 'Windows Internals' p. 219 */
typedef struct _NE_MODULE
diff --git a/include/msdos.h b/include/msdos.h
index 82549e9..052cffa 100644
--- a/include/msdos.h
+++ b/include/msdos.h
@@ -1,11 +1,8 @@
#ifndef __WINE_MSDOS_H
#define __WINE_MSDOS_H
-#include <sys/types.h>
-#include <dirent.h>
-#include "windows.h"
-#include "comm.h"
#include "winnt.h"
+#include "comm.h"
struct fcb {
BYTE drive;
diff --git a/include/ntdll.h b/include/ntdll.h
index ccc3649..2fb7a08 100644
--- a/include/ntdll.h
+++ b/include/ntdll.h
@@ -9,8 +9,6 @@
#include "winbase.h"
-/* assumes windows.h already included */
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/ole.h b/include/ole.h
index f624620..a71dfe5 100644
--- a/include/ole.h
+++ b/include/ole.h
@@ -5,7 +5,7 @@
#ifndef __WINE_OLE_H
#define __WINE_OLE_H
-#include "wingdi.h"
+#include "wingdi.h" /* LOGPALETTE */
/* FIXME: we need to include wtypes.h mainly, it seems, because we need BSTR.
* Normally none of the APIs in ole.h depend on it. It is most likey that they should
diff --git a/include/ole2.h b/include/ole2.h
index 3acb26e..2bf8720 100644
--- a/include/ole2.h
+++ b/include/ole2.h
@@ -5,8 +5,8 @@
#ifndef __WINE_OLE2_H
#define __WINE_OLE2_H
-#include "oleidl.h"
#include "wintypes.h"
+#include "oleidl.h"
/* OLE version */
#define rmm 23
diff --git a/include/pe_image.h b/include/pe_image.h
index d0ea88d..88084d8 100644
--- a/include/pe_image.h
+++ b/include/pe_image.h
@@ -1,11 +1,9 @@
#ifndef __WINE_PE_IMAGE_H
#define __WINE_PE_IMAGE_H
-#include <sys/types.h>
-#include "windows.h"
-#include "winnt.h"
+#include "wintypes.h"
+#include "winbase.h"
#include "peexe.h"
-
/* modreference used for attached processes
* all section are calculated here, relocations etc.
*/
diff --git a/include/peexe.h b/include/peexe.h
index 2a728ee..fce3669 100644
--- a/include/peexe.h
+++ b/include/peexe.h
@@ -5,7 +5,6 @@
#define __WINE_PEEXE_H
#include "wintypes.h"
-#include "neexe.h"
typedef struct _IMAGE_FILE_HEADER {
WORD Machine; /* 00 */
diff --git a/include/process.h b/include/process.h
index f24e8d7..6f323ce 100644
--- a/include/process.h
+++ b/include/process.h
@@ -7,9 +7,7 @@
#ifndef __WINE_PROCESS_H
#define __WINE_PROCESS_H
-#include "windows.h"
-#include "winbase.h"
-#include "winnt.h"
+#include "wintypes.h"
#include "module.h"
#include "k32obj.h"
diff --git a/include/progress.h b/include/progress.h
index e269810..2d506f2 100644
--- a/include/progress.h
+++ b/include/progress.h
@@ -7,9 +7,6 @@
#ifndef __WINE_PROGRESS_H
#define __WINE_PROGRESS_H
-#include "windows.h"
-#include "commctrl.h"
-
typedef struct
{
INT32 CurVal; /* Current progress value */
diff --git a/include/prsht.h b/include/prsht.h
index 21dae92..6a8472f 100644
--- a/include/prsht.h
+++ b/include/prsht.h
@@ -1,6 +1,7 @@
#ifndef _WINE_PRSHT_H
#define _WINE_PRSHT_H
+#include "winuser.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/psdrv.h b/include/psdrv.h
index cfc6c34..110e1db 100644
--- a/include/psdrv.h
+++ b/include/psdrv.h
@@ -6,7 +6,7 @@
*
* Copyright 1998 Huw D M Davies
*/
-#include "windows.h"
+#include "wingdi.h"
#include "font.h"
#include "pen.h"
#include "brush.h"
diff --git a/include/queue.h b/include/queue.h
index 5762fe0..8a9836b 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -7,8 +7,8 @@
#ifndef __WINE_QUEUE_H
#define __WINE_QUEUE_H
+#include "wintypes.h"
#include "wine/winuser16.h"
-#include "windows.h"
#include "thread.h"
diff --git a/include/region.h b/include/region.h
index 2d7be11..d296f48 100644
--- a/include/region.h
+++ b/include/region.h
@@ -54,7 +54,7 @@
#ifndef __WINE_REGION_H
#define __WINE_REGION_H
-#include "windows.h"
+#include "wingdi.h"
#include "gdi.h"
diff --git a/include/resource.h b/include/resource.h
index 430763c..fdda758 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -7,8 +7,6 @@
#ifndef __WINE_RESOURCE_H
#define __WINE_RESOURCE_H
-#include "windows.h"
-
#ifndef __WRC_RSC_H
#include "wrc_rsc.h"
#endif
diff --git a/include/scroll.h b/include/scroll.h
index 2b8df75..eace4bb 100644
--- a/include/scroll.h
+++ b/include/scroll.h
@@ -8,7 +8,7 @@
#ifndef __WINE_SCROLL_H
#define __WINE_SCROLL_H
-#include "windows.h"
+#include "wintypes.h"
typedef struct
{
diff --git a/include/shell.h b/include/shell.h
index 0ccd1df..b6f488f 100644
--- a/include/shell.h
+++ b/include/shell.h
@@ -4,9 +4,8 @@
#ifndef __WINE_SHELL_H
#define __WINE_SHELL_H
-#include "windows.h"
-#include "winreg.h"
-#include "imagelist.h"
+#include "wintypes.h"
+#include "windef.h"
/****************************************************************************
diff --git a/include/shlobj.h b/include/shlobj.h
index 5d08598..90469ac 100644
--- a/include/shlobj.h
+++ b/include/shlobj.h
@@ -1,14 +1,12 @@
#ifndef __WINE_SHLOBJ_H
#define __WINE_SHLOBJ_H
+#include "wintypes.h"
#include "wine/obj_base.h"
#include "shell.h"
-#include "ole.h"
-#include "ole2.h"
#include "oleobj.h"
#include "commctrl.h"
#include "prsht.h"
-#include "wintypes.h"
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
#define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
diff --git a/include/stackframe.h b/include/stackframe.h
index 24cad98..0326abd 100644
--- a/include/stackframe.h
+++ b/include/stackframe.h
@@ -7,8 +7,6 @@
#ifndef __WINE_STACKFRAME_H
#define __WINE_STACKFRAME_H
-#include <string.h>
-#include "windows.h"
#include "ldt.h"
#include "thread.h"
diff --git a/include/static.h b/include/static.h
index f29dd7b..54484bf 100644
--- a/include/static.h
+++ b/include/static.h
@@ -7,7 +7,7 @@
#ifndef __WINE_STATIC_H
#define __WINE_STATIC_H
-#include "windows.h"
+#include "wintypes.h"
/* Extra info for STATIC windows */
typedef struct
diff --git a/include/stress.h b/include/stress.h
index f38857e..6f955b6 100644
--- a/include/stress.h
+++ b/include/stress.h
@@ -1,7 +1,7 @@
#ifndef __WINE_STRESS_H
#define __WINE_STRESS_H
-#include <windows.h>
+#include <wintypes.h>
#ifdef __cplusplus
extern "C" {
diff --git a/include/struct32.h b/include/struct32.h
index 71dc16c..f714588 100644
--- a/include/struct32.h
+++ b/include/struct32.h
@@ -1,7 +1,8 @@
/* Structure definitions for Win32 -- used only internally */
#ifndef __WINE__STRUCT32_H
#define __WINE__STRUCT32_H
-#include "windows.h"
+
+#include "winbase.h"
#include "queue.h"
extern void STRUCT32_MINMAXINFO32to16( const MINMAXINFO32*, MINMAXINFO16* );
diff --git a/include/sysmetrics.h b/include/sysmetrics.h
index bfb6cf3..24d7307 100644
--- a/include/sysmetrics.h
+++ b/include/sysmetrics.h
@@ -7,9 +7,7 @@
#ifndef __WINE_SYSMETRICS_H
#define __WINE_SYSMETRICS_H
-#include "windows.h"
-
-
+#include "wingdi.h"
/* Constant system metrics */
#if 0
#ifdef WIN_95_LOOK
diff --git a/include/thread.h b/include/thread.h
index 1238664..8832361 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -9,7 +9,6 @@
#include "config.h"
#include "k32obj.h"
-#include "windows.h"
#include "winbase.h"
#include "winnt.h"
#include "selectors.h" /* for SET_FS */
diff --git a/include/tlhelp32.h b/include/tlhelp32.h
index b8b798a..b28d4cc 100644
--- a/include/tlhelp32.h
+++ b/include/tlhelp32.h
@@ -1,7 +1,7 @@
#ifndef __WINE_TLHELP32_H
#define __WINE_TLHELP32_H
-#include "windows.h"
+#include "wintypes.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/toolhelp.h b/include/toolhelp.h
index 8b422a9..1286d3d 100644
--- a/include/toolhelp.h
+++ b/include/toolhelp.h
@@ -1,7 +1,7 @@
#ifndef __WINE_TOOLHELP_H
#define __WINE_TOOLHELP_H
-#include "windows.h"
+#include "windef.h"
#include "tlhelp32.h"
#define MAX_DATA 11
diff --git a/include/updown.h b/include/updown.h
index 6256f19..dbb597c 100644
--- a/include/updown.h
+++ b/include/updown.h
@@ -7,9 +7,6 @@
#ifndef __WINE_UPDOWN_H
#define __WINE_UPDOWN_H
-#include "windows.h"
-#include "commctrl.h"
-
typedef struct
{
UINT32 AccelCount; /* Number of elements in AccelVect */
diff --git a/include/ver.h b/include/ver.h
index 04802c5..f0bab9d 100644
--- a/include/ver.h
+++ b/include/ver.h
@@ -5,7 +5,7 @@
#ifndef __WINE_VER_H
#define __WINE_VER_H
-#include "windows.h"
+#include "wintypes.h"
/* resource ids for different version infos */
#define VS_FILE_INFO MAKEINTRESOURCE16(16)
diff --git a/include/vfw.h b/include/vfw.h
index 6375419..1bad215 100644
--- a/include/vfw.h
+++ b/include/vfw.h
@@ -1,9 +1,10 @@
#ifndef __WINE_VFW_H
#define __WINE_VFW_H
-#include <wintypes.h>
-#include <driver.h>
-#include <objbase.h>
+#include "wintypes.h"
+#include "wingdi.h"
+#include "driver.h"
+#include "objbase.h"
#define VFWAPI WINAPI
#define VFWAPIV WINAPIV
diff --git a/include/win.h b/include/win.h
index 5fe5431..fad6676 100644
--- a/include/win.h
+++ b/include/win.h
@@ -7,12 +7,8 @@
#ifndef __WINE_WIN_H
#define __WINE_WIN_H
-#include "class.h"
-#include "ldt.h"
-#include "windows.h"
-#include "winproc.h"
#include "queue.h"
-
+#include "class.h"
#define WND_MAGIC 0x444e4957 /* 'WIND' */
diff --git a/include/win16drv.h b/include/win16drv.h
index 8ff174b..8f943e8 100644
--- a/include/win16drv.h
+++ b/include/win16drv.h
@@ -5,7 +5,7 @@
#ifndef __WINE_WIN16DRV_H
#define __WINE_WIN16DRV_H
-#include "windows.h"
+#include "wingdi.h"
#include "gdi.h"
#define SETHIGHBIT
diff --git a/include/wine/obj_moniker.h b/include/wine/obj_moniker.h
index e42c480..91565dd 100644
--- a/include/wine/obj_moniker.h
+++ b/include/wine/obj_moniker.h
@@ -5,11 +5,11 @@
*/
-#include "wine/obj_misc.h"
#ifndef __WINE_WINE_OBJ_MONIKER_H
#define __WINE_WINE_OBJ_MONIKER_H
+#include "wine/obj_misc.h"
/*****************************************************************************
* Predeclare the interfaces
*/
diff --git a/include/wine/w32skrnl.h b/include/wine/w32skrnl.h
index e5dd128..5bc98ba 100644
--- a/include/wine/w32skrnl.h
+++ b/include/wine/w32skrnl.h
@@ -1,7 +1,6 @@
#ifndef _W32SKRNL_H
#define _W32SKRNL_H
#include "wintypes.h"
-HTASK16 WINAPI GetCurrentTask(void);
LPSTR WINAPI GetWin32sDirectory(void);
DWORD WINAPI RtlNtStatusToDosError(DWORD error);
#endif /* _W32SKRNL_H */
diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h
index 1c9f9d1..00c28db 100644
--- a/include/wine/winbase16.h
+++ b/include/wine/winbase16.h
@@ -56,6 +56,7 @@
HANDLE16 WINAPI GetCodeHandle(FARPROC16);
VOID WINAPI GetCodeInfo(FARPROC16,SEGINFO*);
DWORD WINAPI GetCurrentPDB(void);
+HTASK16 WINAPI GetCurrentTask(void);
SEGPTR WINAPI GetDOSEnvironment(void);
HMODULE16 WINAPI GetExePtr(HANDLE16);
WORD WINAPI GetExeVersion(void);
diff --git a/include/wine/winestring.h b/include/wine/winestring.h
index 298ed8f..ee01331 100644
--- a/include/wine/winestring.h
+++ b/include/wine/winestring.h
@@ -1,5 +1,8 @@
#ifndef _INCLUDE_WINE_STRINGS_H
#define _INCLUDE_WINE_STRINGS_H
+
+#include "wintypes.h"
+
INT16 WINAPI WideCharToLocal16(LPSTR,LPWSTR,INT16);
INT32 WINAPI WideCharToLocal32(LPSTR,LPWSTR,INT32);
#define WideCharToLocal WINELIB_NAME(WideCharToLocal)
diff --git a/include/winsock.h b/include/winsock.h
index 13c9b0e..6961d96 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -26,7 +26,7 @@
# define HAVE_IPX
#endif
-#include "windows.h"
+#include "wintypes.h"
#include "task.h"
#pragma pack(1)
diff --git a/include/winspool.h b/include/winspool.h
index 87ff118..99dc631 100644
--- a/include/winspool.h
+++ b/include/winspool.h
@@ -8,7 +8,9 @@
#ifndef __WINE_WINSPOOL_H
#define __WINE_WINSPOOL_H
-#include "windows.h"
+#include "wintypes.h"
+#include "winbase.h"
+#include "wingdi.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/winver.h b/include/winver.h
index 0fae9b8..a489eb7 100644
--- a/include/winver.h
+++ b/include/winver.h
@@ -1,6 +1,8 @@
#ifndef __WINE_WINVER_H
#define __WINE_WINVER_H
+#include "wintypes.h"
+
DWORD WINAPI VerFindFile16(UINT16,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16*,LPSTR,UINT16*);
DWORD WINAPI VerFindFile32A(UINT32,LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT32*,LPSTR,UINT32*);
DWORD WINAPI VerFindFile32W(UINT32,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,UINT32*,LPWSTR,UINT32*);