This is a relatively small step towards cleaning up the dumping ground that Wine's winternl.h has become.
From: Alex Henrie alexhenrie24@gmail.com
So that winioctl.h and ddk/wdm.h can be included at the same time without triggering a GCC warning. --- include/winioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/winioctl.h b/include/winioctl.h index ae04c37a462..5be5a566015 100644 --- a/include/winioctl.h +++ b/include/winioctl.h @@ -23,7 +23,7 @@ (DWORD)((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \ )
-#define DEVICE_TYPE DWORD +#define DEVICE_TYPE ULONG
#define FILE_DEVICE_BEEP 0x00000001 #define FILE_DEVICE_CD_ROM 0x00000002
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/kernel32/tests/locale.c | 1 + dlls/kernelbase/locale.c | 1 + dlls/ntdll/actctx.c | 3 +- dlls/ntdll/loader.c | 1 + dlls/ntdll/locale.c | 5 ---- dlls/ntdll/ntdll_misc.h | 3 ++ dlls/ntdll/printf.c | 2 -- dlls/ntdll/rtlstr.c | 2 +- dlls/ntdll/string.c | 3 ++ dlls/ntdll/tests/om.c | 1 + dlls/ntdll/tests/pipe.c | 1 + dlls/ntdll/tests/reg.c | 1 + dlls/ntdll/unix/env.c | 1 + dlls/ntdll/wcstring.c | 5 +--- dlls/win32u/bitblt.c | 3 -- dlls/win32u/bitmap.c | 3 -- dlls/win32u/brush.c | 3 -- dlls/win32u/clipboard.c | 4 +-- dlls/win32u/clipping.c | 4 +-- dlls/win32u/dc.c | 8 +----- dlls/win32u/dce.c | 3 +- dlls/win32u/dib.c | 8 ------ dlls/win32u/font.c | 8 +----- dlls/win32u/freetype.c | 8 ------ dlls/win32u/gdiobj.c | 9 +----- dlls/win32u/mapping.c | 3 -- dlls/win32u/opentype.c | 7 +---- dlls/win32u/painting.c | 4 --- dlls/win32u/path.c | 5 ---- dlls/win32u/pen.c | 3 -- dlls/win32u/printdrv.c | 8 +----- dlls/win32u/syscall.c | 4 --- dlls/win32u/sysparams.c | 2 -- dlls/win32u/win32u_private.h | 5 +--- dlls/win32u/window.c | 2 -- dlls/win32u/winstation.c | 7 ----- dlls/wineps.drv/unixlib.c | 8 ++---- dlls/winewayland.drv/waylanddrv.h | 3 -- dlls/winex11.drv/clipboard.c | 2 -- dlls/winex11.drv/graphics.c | 5 +--- dlls/winex11.drv/init.c | 4 +-- dlls/winex11.drv/palette.c | 2 -- dlls/winex11.drv/vulkan.c | 5 +--- dlls/winex11.drv/window.c | 3 -- dlls/winex11.drv/wintab.c | 2 -- dlls/winex11.drv/x11drv.h | 3 -- dlls/winex11.drv/x11drv_main.c | 3 -- dlls/winex11.drv/xrender.c | 3 -- include/ddk/ntifs.h | 9 +++++- include/ddk/ntnls.h | 46 +++++++++++++++++++++++++++++++ include/wine/gdi_driver.h | 6 ++++ include/winternl.h | 30 -------------------- 52 files changed, 90 insertions(+), 185 deletions(-) create mode 100644 include/ddk/ntnls.h
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index bebd857dfa4..ea6d5390d36 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -41,6 +41,7 @@ #include "winnls.h" #include "winternl.h" #include "winreg.h" +#include "ddk/ntifs.h"
static const WCHAR upper_case[] = {'\t','J','U','S','T','!',' ','A',',',' ','T','E','S','T',';',' ','S','T','R','I','N','G',' ','1','/','*','+','-','.','\r','\n',0}; static const WCHAR lower_case[] = {'\t','j','u','s','t','!',' ','a',',',' ','t','e','s','t',';',' ','s','t','r','i','n','g',' ','1','/','*','+','-','.','\r','\n',0}; diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 44af29f163d..fb8de84e355 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -35,6 +35,7 @@ #include "winnls.h" #include "winuser.h" #include "winternl.h" +#include "ddk/ntifs.h" #include "kernelbase.h" #include "wine/debug.h"
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index fbffe691559..1fe075d23dd 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -29,8 +29,7 @@ #include "ntstatus.h" #define WIN32_NO_STATUS #include "winternl.h" -#include "ddk/ntddk.h" -#include "ddk/wdm.h" +#include "ddk/ntifs.h" #include "ntdll_misc.h" #include "wine/exception.h" #include "wine/debug.h" diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 55065117a01..969323ac157 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -29,6 +29,7 @@ #include "winnt.h" #include "winioctl.h" #include "winternl.h" +#include "ddk/ntifs.h" #include "delayloadhandler.h"
#include "wine/exception.h" diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 545cc628909..f177fbaadcd 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -22,11 +22,6 @@ #include <string.h> #include <stdlib.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winnls.h" #include "ntdll_misc.h" #include "locale_private.h" #include "wine/debug.h" diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 40273d8944a..d64e56fb3b8 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -23,10 +23,13 @@ #include <stdlib.h> #include <sys/types.h>
+#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winnt.h" #include "winternl.h" +#include "ddk/ntifs.h" #include "unixlib.h" #include "wine/asm.h"
diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c index 37419ea1e83..b7f684a795e 100644 --- a/dlls/ntdll/printf.c +++ b/dlls/ntdll/printf.c @@ -27,8 +27,6 @@ #include <stdio.h> #include <string.h>
-#include "windef.h" -#include "winternl.h" #include "ntdll_misc.h" #include "wine/debug.h"
diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index 9326c73070e..042adeca16d 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -30,7 +30,7 @@ #include "windef.h" #include "winnt.h" #include "winternl.h" -#include "ddk/ntddk.h" +#include "ddk/ntifs.h" #include "wine/debug.h" #include "ntdll_misc.h"
diff --git a/dlls/ntdll/string.c b/dlls/ntdll/string.c index a48496b65c6..005d85ff725 100644 --- a/dlls/ntdll/string.c +++ b/dlls/ntdll/string.c @@ -28,10 +28,13 @@ #include <string.h> #include <stdint.h>
+#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winnls.h" #include "winternl.h" +#include "ddk/ntifs.h" #include "ntdll_misc.h"
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 62659fc8cb4..a4d38140c60 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -22,6 +22,7 @@ #include "ntdll_test.h" #include "winternl.h" #include "winuser.h" +#include "ddk/ntifs.h" #include "ddk/wdm.h" #include "stdio.h" #include "winnt.h" diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 697774dfa09..77441a58a6d 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -30,6 +30,7 @@ #include "wine/test.h" #include "winternl.h" #include "winioctl.h" +#include "ddk/ntifs.h"
#ifndef __WINE_WINTERNL_H
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 0d1ffbb4ff6..03e813a70f0 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -24,6 +24,7 @@
#include "ntdll_test.h" #include "winternl.h" +#include "ddk/ntifs.h" #include "stdio.h" #include "winnt.h" #include "winnls.h" diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index ad9ab0dc220..0f71c28bc16 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -52,6 +52,7 @@ #include "winternl.h" #include "winbase.h" #include "winnls.h" +#include "ddk/ntifs.h" #include "wine/condrv.h" #include "wine/debug.h" #include "unix_private.h" diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index aa43c3de16b..0158a406aa7 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -28,11 +28,8 @@ #include <stdarg.h> #include <stdio.h>
-#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winternl.h" #include "ntdll_misc.h" +#include "winnls.h"
static const unsigned short wctypes[256] = { diff --git a/dlls/win32u/bitblt.c b/dlls/win32u/bitblt.c index 48c76bac676..46bb79d3867 100644 --- a/dlls/win32u/bitblt.c +++ b/dlls/win32u/bitblt.c @@ -27,9 +27,6 @@ #include <math.h> #include <float.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/bitmap.c b/dlls/win32u/bitmap.c index f255e4196e9..d88697f71bb 100644 --- a/dlls/win32u/bitmap.c +++ b/dlls/win32u/bitmap.c @@ -27,9 +27,6 @@ #include <stdlib.h> #include <string.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/brush.c b/dlls/win32u/brush.c index 29a96035599..6cf6419c7ad 100644 --- a/dlls/win32u/brush.c +++ b/dlls/win32u/brush.c @@ -25,9 +25,6 @@ #include <stdarg.h> #include <string.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/clipboard.c b/dlls/win32u/clipboard.c index 6cf484a56ca..554065b5ac9 100644 --- a/dlls/win32u/clipboard.c +++ b/dlls/win32u/clipboard.c @@ -28,9 +28,7 @@ #endif
#include <pthread.h> -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "win32u_private.h" + #include "ntgdi_private.h" #include "ntuser_private.h" #include "wine/server.h" diff --git a/dlls/win32u/clipping.c b/dlls/win32u/clipping.c index 11027824362..ddb9450486e 100644 --- a/dlls/win32u/clipping.c +++ b/dlls/win32u/clipping.c @@ -24,9 +24,7 @@
#include <stdarg.h> #include <stdlib.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" + #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/dc.c b/dlls/win32u/dc.c index 16920e08d33..13fd5c53886 100644 --- a/dlls/win32u/dc.c +++ b/dlls/win32u/dc.c @@ -28,14 +28,8 @@ #include <string.h> #include <pthread.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winreg.h" -#include "winnls.h" -#include "winternl.h" -#include "winerror.h" #include "ntgdi_private.h" +#include "winnls.h" #include "wine/wgl.h" #include "wine/wgl_driver.h"
diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 5df30550cae..df71026cdbb 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -25,8 +25,7 @@
#include <assert.h> #include <pthread.h> -#include "ntstatus.h" -#define WIN32_NO_STATUS + #include "ntgdi_private.h" #include "ntuser_private.h" #include "wine/server.h" diff --git a/dlls/win32u/dib.c b/dlls/win32u/dib.c index 23dbfbcbfaf..92e12b98bdd 100644 --- a/dlls/win32u/dib.c +++ b/dlls/win32u/dib.c @@ -68,14 +68,6 @@ #include <string.h> #include <assert.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winternl.h" -#include "ddk/d3dkmthk.h" - #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 9ee89f1b5c4..27eac2472fa 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -31,15 +31,9 @@ #include <assert.h> #include <pthread.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "winerror.h" -#include "windef.h" -#include "winbase.h" +#include "ntgdi_private.h" #include "winnls.h" -#include "winternl.h" #include "winreg.h" -#include "ntgdi_private.h"
#include "wine/unixlib.h" #include "wine/rbtree.h" diff --git a/dlls/win32u/freetype.c b/dlls/win32u/freetype.c index 701e15c110d..1ea691905fe 100644 --- a/dlls/win32u/freetype.c +++ b/dlls/win32u/freetype.c @@ -114,14 +114,6 @@ #endif #endif /* HAVE_FT2BUILD_H */
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winternl.h" -#include "winerror.h" -#include "winreg.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h" #include "wine/list.h" diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 057988e99e9..e230c7056a8 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -28,15 +28,8 @@ #include <stdio.h> #include <pthread.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winreg.h" -#include "winnls.h" -#include "winerror.h" -#include "winternl.h" - #include "ntgdi_private.h" +#include "winnls.h" #include "wine/debug.h" #include "wine/unixlib.h"
diff --git a/dlls/win32u/mapping.c b/dlls/win32u/mapping.c index 65f276e853f..cd09b78d642 100644 --- a/dlls/win32u/mapping.c +++ b/dlls/win32u/mapping.c @@ -24,9 +24,6 @@
#include <stdarg.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/opentype.c b/dlls/win32u/opentype.c index 7a541ae4e4a..703bfb21820 100644 --- a/dlls/win32u/opentype.c +++ b/dlls/win32u/opentype.c @@ -24,13 +24,8 @@ #include <stdarg.h> #include <stdlib.h>
-#include "windef.h" -#include "winbase.h" -#include "winnls.h" - -#include "wine/debug.h" - #include "ntgdi_private.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(font);
diff --git a/dlls/win32u/painting.c b/dlls/win32u/painting.c index a5a0f2e47a5..2841a4a45fb 100644 --- a/dlls/win32u/painting.c +++ b/dlls/win32u/painting.c @@ -28,10 +28,6 @@ #include <string.h> #include <stdlib.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winerror.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/path.c b/dlls/win32u/path.c index e0c96f5ef6f..d0eb0381620 100644 --- a/dlls/win32u/path.c +++ b/dlls/win32u/path.c @@ -32,11 +32,6 @@ #include <stdlib.h> #include <float.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winerror.h" - #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/pen.c b/dlls/win32u/pen.c index f45d7bb1c4e..7e0430ae1aa 100644 --- a/dlls/win32u/pen.c +++ b/dlls/win32u/pen.c @@ -27,9 +27,6 @@ #include <string.h> #include <assert.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" #include "ntgdi_private.h" #include "wine/debug.h"
diff --git a/dlls/win32u/printdrv.c b/dlls/win32u/printdrv.c index bd8072a4027..5a078d293c7 100644 --- a/dlls/win32u/printdrv.c +++ b/dlls/win32u/printdrv.c @@ -27,14 +27,8 @@
#include <stdarg.h>
-#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "winspool.h" -#include "winerror.h" -#include "wine/debug.h" #include "ntgdi_private.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(print);
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index c03118821d9..0441b241862 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -24,10 +24,6 @@
#include <stdarg.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winnt.h" #include "ntgdi_private.h" #include "ntuser_private.h" #include "ntuser.h" diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 1573edf069f..b8a0e879eb5 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -27,8 +27,6 @@ #include <pthread.h> #include <assert.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS #include "ntgdi_private.h" #include "ntuser_private.h" #include "winreg.h" diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index d5f010a8249..790c0bf1c9a 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -23,10 +23,7 @@
#include <stdarg.h> #include <stdlib.h> -#include "windef.h" -#include "winbase.h" -#include "ntgdi.h" -#include "ntuser.h" + #include "wine/gdi_driver.h" #include "wine/unixlib.h" #include "wine/debug.h" diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 69dd8caba5d..6705d4e4a3c 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -25,8 +25,6 @@
#include <assert.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS #include "ntgdi_private.h" #include "ntuser_private.h" #include "wine/server.h" diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c index 9df27517a43..0f4fe803817 100644 --- a/dlls/win32u/winstation.c +++ b/dlls/win32u/winstation.c @@ -22,13 +22,6 @@ #pragma makedep unix #endif
-#include "ntstatus.h" -#define WIN32_NO_STATUS -#include <stdarg.h> -#include "windef.h" -#include "winbase.h" -#include "ntuser.h" -#include "ddk/wdm.h" #include "ntgdi_private.h" #include "ntuser_private.h" #include "wine/server.h" diff --git a/dlls/wineps.drv/unixlib.c b/dlls/wineps.drv/unixlib.c index e9b009b0e87..3c509f01e3a 100644 --- a/dlls/wineps.drv/unixlib.c +++ b/dlls/wineps.drv/unixlib.c @@ -28,14 +28,10 @@ #include <stdlib.h> #include <math.h>
-#include "windef.h" -#include "winbase.h" - +#include "wine/gdi_driver.h" +#include "ddk/winddi.h" #include "ntf.h" #include "unixlib.h" -#include "ntgdi.h" -#include "ddk/winddi.h" -#include "wine/gdi_driver.h" #include "wine/debug.h" #include "wine/wingdi16.h"
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index f030f6fc6a0..f731f2f43ec 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -35,9 +35,6 @@ #include "xdg-output-unstable-v1-client-protocol.h" #include "xdg-shell-client-protocol.h"
-#include "windef.h" -#include "winbase.h" -#include "ntgdi.h" #include "wine/gdi_driver.h" #include "wine/list.h" #include "wine/rbtree.h" diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 087e0aab79b..430ff27efb1 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -80,8 +80,6 @@ #include <time.h> #include <assert.h>
-#include "ntstatus.h" -#define WIN32_NO_STATUS #include "x11drv.h"
#ifdef HAVE_X11_EXTENSIONS_XFIXES_H diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 4a0564392bd..58b5effa34e 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -42,11 +42,8 @@ #include <string.h> #include <limits.h>
-#include "windef.h" -#include "winbase.h" -#include "winreg.h" - #include "x11drv.h" +#include "winreg.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(graphics); diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 43fb0ac0c1c..34f406bc9b1 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -27,10 +27,8 @@ #include <stdarg.h> #include <string.h>
-#include "windef.h" -#include "winbase.h" -#include "winreg.h" #include "x11drv.h" +#include "winreg.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(x11drv); diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c index 43974fe8896..25efa632fff 100644 --- a/dlls/winex11.drv/palette.c +++ b/dlls/winex11.drv/palette.c @@ -28,8 +28,6 @@ #include <stdlib.h> #include <string.h>
-#include "windef.h" -#include "winbase.h" #include "x11drv.h" #include "wine/debug.h"
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index 576c0788fc1..7e1b85bd960 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -30,11 +30,8 @@ #include <stdio.h> #include <dlfcn.h>
-#include "windef.h" -#include "winbase.h" - -#include "wine/debug.h" #include "x11drv.h" +#include "wine/debug.h"
#define VK_NO_PROTOTYPES #define WINE_VK_HOST diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 8ab694450ef..93ff28cf39b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -44,9 +44,6 @@ /* avoid conflict with field names in included win32 headers */ #undef Status
-#include "ntstatus.h" -#define WIN32_NO_STATUS - #include "x11drv.h" #include "wingdi.h" #include "winuser.h" diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 6f1437f14c6..60ca79abfd9 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -29,8 +29,6 @@ #include <math.h> #include <dlfcn.h>
-#include "windef.h" -#include "winbase.h" #include "x11drv.h" #include "wine/debug.h" #include "wintab.h" diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 71a3582ff76..196fd7e8a18 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -60,9 +60,6 @@ typedef int Status; /* avoid conflict with processthreadsapi.h */ #undef ControlMask
-#include "windef.h" -#include "winbase.h" -#include "ntgdi.h" #include "wine/gdi_driver.h" #include "unixlib.h" #include "wine/list.h" diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 0925fe54b9c..eba41bf3914 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -41,9 +41,6 @@ #include <X11/extensions/Xrender.h> #endif
-#include "ntstatus.h" -#define WIN32_NO_STATUS - #define VK_NO_PROTOTYPES #define WINE_VK_HOST
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 74723915fc5..308b4db3911 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -35,10 +35,7 @@ #include <stdlib.h> #include <dlfcn.h>
-#include "windef.h" -#include "winbase.h" #include "x11drv.h" -#include "winternl.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xrender); diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h index 980235abdc9..dcc1f78b04c 100644 --- a/include/ddk/ntifs.h +++ b/include/ddk/ntifs.h @@ -20,6 +20,7 @@ #define __NTIFS_H__
#include "ntddk.h" +#include "ntnls.h"
#define PHCM_ERROR_INVALID_PARAMETER ((char)-1) #define PHCM_ERROR_NO_TEB ((char)-2) @@ -214,6 +215,12 @@ BOOLEAN WINAPI PsIsSystemThread(PETHREAD); NTSTATUS WINAPI PsLookupProcessByProcessId(HANDLE,PEPROCESS*); NTSTATUS WINAPI PsLookupThreadByThreadId(HANDLE,PETHREAD*); void WINAPI PsRevertToSelf(void); -char WINAPI RtlQueryProcessPlaceholderCompatibilityMode(void); +NTSYSAPI NTSTATUS WINAPI RtlCustomCPToUnicodeN(CPTABLEINFO*,WCHAR*,DWORD,DWORD*,const char*,DWORD); +NTSYSAPI void WINAPI RtlInitCodePageTable(USHORT*,CPTABLEINFO*); +NTSYSAPI void WINAPI RtlInitNlsTables(USHORT*,USHORT*,USHORT*,NLSTABLEINFO*); +NTSYSAPI char WINAPI RtlQueryProcessPlaceholderCompatibilityMode(void); +NTSYSAPI void WINAPI RtlResetRtlTranslations(const NLSTABLEINFO*); +NTSYSAPI NTSTATUS WINAPI RtlUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD); +NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD);
#endif diff --git a/include/ddk/ntnls.h b/include/ddk/ntnls.h new file mode 100644 index 00000000000..3cd9eb2c17d --- /dev/null +++ b/include/ddk/ntnls.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _NTNLS_ +#define _NTNLS_ + +typedef struct _CPTABLEINFO +{ + USHORT CodePage; + USHORT MaximumCharacterSize; + USHORT DefaultChar; + USHORT UniDefaultChar; + USHORT TransDefaultChar; + USHORT TransUniDefaultChar; + USHORT DBCSCodePage; + UCHAR LeadByte[12]; + USHORT *MultiByteTable; + void *WideCharTable; + USHORT *DBCSRanges; + USHORT *DBCSOffsets; +} CPTABLEINFO, *PCPTABLEINFO; + +typedef struct _NLSTABLEINFO +{ + CPTABLEINFO OemTableInfo; + CPTABLEINFO AnsiTableInfo; + USHORT *UpperCaseTable; + USHORT *LowerCaseTable; +} NLSTABLEINFO, *PNLSTABLEINFO; + +#endif diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index bd827c31cb1..1e7bd7440b8 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -25,7 +25,13 @@ #error The GDI driver can only be used on the Unix side #endif
+#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" #include "winternl.h" +#include "ddk/ntifs.h" +#include "ntgdi.h" #include "ntuser.h" #include "immdev.h" #include "shellapi.h" diff --git a/include/winternl.h b/include/winternl.h index 52af87320a5..8be4a75ec5b 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3626,30 +3626,6 @@ typedef enum _SYSDBG_COMMAND { SysDbgMaxInfoClass } SYSDBG_COMMAND, *PSYSDBG_COMMAND;
-typedef struct _CPTABLEINFO -{ - USHORT CodePage; - USHORT MaximumCharacterSize; - USHORT DefaultChar; - USHORT UniDefaultChar; - USHORT TransDefaultChar; - USHORT TransUniDefaultChar; - USHORT DBCSCodePage; - UCHAR LeadByte[12]; - USHORT *MultiByteTable; - void *WideCharTable; - USHORT *DBCSRanges; - USHORT *DBCSOffsets; -} CPTABLEINFO, *PCPTABLEINFO; - -typedef struct _NLSTABLEINFO -{ - CPTABLEINFO OemTableInfo; - CPTABLEINFO AnsiTableInfo; - USHORT *UpperCaseTable; - USHORT *LowerCaseTable; -} NLSTABLEINFO, *PNLSTABLEINFO; - /************************************************************************* * Loader structures * @@ -4713,7 +4689,6 @@ NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCST NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING*,ULONG,RTL_USER_PROCESS_PARAMETERS*,SECURITY_DESCRIPTOR*,SECURITY_DESCRIPTOR*,HANDLE,BOOLEAN,HANDLE,HANDLE,RTL_USER_PROCESS_INFORMATION*); NTSYSAPI NTSTATUS WINAPI RtlCreateUserStack(SIZE_T,SIZE_T,ULONG,SIZE_T,SIZE_T,INITIAL_TEB*); NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,SECURITY_DESCRIPTOR*,BOOLEAN,ULONG,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*); -NTSYSAPI NTSTATUS WINAPI RtlCustomCPToUnicodeN(CPTABLEINFO*,WCHAR*,DWORD,DWORD*,const char*,DWORD); NTSYSAPI PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*); NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR); NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID); @@ -4852,8 +4827,6 @@ NTSYSAPI PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD NTSYSAPI NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL); NTSYSAPI void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ); NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ); -NTSYSAPI void WINAPI RtlInitCodePageTable(USHORT*,CPTABLEINFO*); -NTSYSAPI void WINAPI RtlInitNlsTables(USHORT*,USHORT*,USHORT*,NLSTABLEINFO*); NTSYSAPI void WINAPI RtlInitString(PSTRING,PCSZ); NTSYSAPI void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR); NTSYSAPI NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR); @@ -4948,7 +4921,6 @@ NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK*); NTSYSAPI void WINAPI RtlReleaseSRWLockShared(RTL_SRWLOCK*); NTSYSAPI ULONG WINAPI RtlRemoveVectoredContinueHandler(PVOID); NTSYSAPI ULONG WINAPI RtlRemoveVectoredExceptionHandler(PVOID); -NTSYSAPI void WINAPI RtlResetRtlTranslations(const NLSTABLEINFO*); NTSYSAPI void WINAPI RtlRestoreLastWin32Error(DWORD); NTSYSAPI void WINAPI RtlSecondsSince1970ToTime(DWORD,LARGE_INTEGER *); NTSYSAPI void WINAPI RtlSecondsSince1980ToTime(DWORD,LARGE_INTEGER *); @@ -4999,7 +4971,6 @@ NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING,PCUNICODE_ST NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToInteger(const UNICODE_STRING *,ULONG,ULONG *); NTSYSAPI DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*); NTSYSAPI NTSTATUS WINAPI RtlUnicodeStringToOemString(POEM_STRING,PCUNICODE_STRING,BOOLEAN); -NTSYSAPI NTSTATUS WINAPI RtlUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD); NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD); NTSYSAPI NTSTATUS WINAPI RtlUnicodeToMultiByteSize(PULONG,PCWSTR,ULONG); NTSYSAPI NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD); @@ -5010,7 +4981,6 @@ NTSYSAPI WCHAR WINAPI RtlUpcaseUnicodeChar(WCHAR); NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN); NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString(STRING*,const UNICODE_STRING*,BOOLEAN); NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN); -NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToCustomCPN(CPTABLEINFO*,char*,DWORD,DWORD*,const WCHAR*,DWORD); NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD); NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD); NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD);