[PATCH 10/11] winemac: Build with msvcrt.

Jacek Caban wine at gitlab.winehq.org
Thu Jun 2 19:51:25 CDT 2022


From: Jacek Caban <jacek at codeweavers.com>

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
 dlls/winemac.drv/Makefile.in  |  2 --
 dlls/winemac.drv/dllmain.c    |  5 ++---
 dlls/winemac.drv/dragdrop.c   |  5 ++---
 dlls/winemac.drv/ime.c        |  8 ++-----
 dlls/winemac.drv/macdrv.h     | 12 -----------
 dlls/winemac.drv/macdrv_dll.h | 39 +++++++++++++++++++++++++++++++++++
 6 files changed, 45 insertions(+), 26 deletions(-)
 create mode 100644 dlls/winemac.drv/macdrv_dll.h

diff --git a/dlls/winemac.drv/Makefile.in b/dlls/winemac.drv/Makefile.in
index e3d3180b2d1..19f3e834cec 100644
--- a/dlls/winemac.drv/Makefile.in
+++ b/dlls/winemac.drv/Makefile.in
@@ -5,8 +5,6 @@ IMPORTS   = uuid rpcrt4 user32 gdi32 win32u
 DELAYIMPORTS = ole32 shell32 imm32
 EXTRALIBS = -lwin32u -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo -framework QuartzCore $(METAL_LIBS)
 
-EXTRADLLFLAGS = -mcygwin
-
 C_SRCS = \
 	clipboard.c \
 	display.c \
diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c
index 2ffbc12083d..0618ec83228 100644
--- a/dlls/winemac.drv/dllmain.c
+++ b/dlls/winemac.drv/dllmain.c
@@ -18,9 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include <stdarg.h>
-#include "macdrv.h"
+#include "macdrv_dll.h"
+#include "macdrv_res.h"
 #include "shellapi.h"
 #include "wine/debug.h"
 
diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c
index aec8b1f4790..afd4fb0a6d2 100644
--- a/dlls/winemac.drv/dragdrop.c
+++ b/dlls/winemac.drv/dragdrop.c
@@ -20,18 +20,17 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-
 #define NONAMELESSUNION
 
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
-#include "macdrv.h"
+#include "macdrv_dll.h"
 
 #define COBJMACROS
 #include "objidl.h"
 #include "shellapi.h"
 #include "shlobj.h"
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(dragdrop);
 
diff --git a/dlls/winemac.drv/ime.c b/dlls/winemac.drv/ime.c
index 756e880c5a3..fd94591a2b8 100644
--- a/dlls/winemac.drv/ime.c
+++ b/dlls/winemac.drv/ime.c
@@ -34,14 +34,10 @@
  *    here the IMM level deals with if the application is IME aware or not.
  */
 
-#include "config.h"
-
-#include <stdarg.h>
-
-#include "macdrv.h"
-#include "winuser.h"
+#include "macdrv_dll.h"
 #include "imm.h"
 #include "ddk/imm.h"
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(imm);
 
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h
index 735cfc84d87..7c0f7127883 100644
--- a/dlls/winemac.drv/macdrv.h
+++ b/dlls/winemac.drv/macdrv.h
@@ -41,7 +41,6 @@ extern BOOL allow_vsync DECLSPEC_HIDDEN;
 extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
 extern BOOL allow_software_rendering DECLSPEC_HIDDEN;
 extern BOOL disable_window_decorations DECLSPEC_HIDDEN;
-extern HMODULE macdrv_module DECLSPEC_HIDDEN;
 
 extern NTSTATUS (WINAPI *pNtWaitForMultipleObjects)(ULONG,const HANDLE*,BOOLEAN,
                                                     BOOLEAN,const LARGE_INTEGER*) DECLSPEC_HIDDEN;
@@ -276,13 +275,6 @@ extern void check_retina_status(void) DECLSPEC_HIDDEN;
 extern void macdrv_init_display_devices(BOOL force) DECLSPEC_HIDDEN;
 extern void init_user_driver(void) DECLSPEC_HIDDEN;
 
-/**************************************************************************
- * Mac IME driver
- */
-
-extern NTSTATUS WINAPI macdrv_ime_set_text(void *params, ULONG size) DECLSPEC_HIDDEN;
-extern NTSTATUS WINAPI macdrv_ime_query_char_rect(void *params, ULONG size) DECLSPEC_HIDDEN;
-
 /* unixlib interface */
 
 extern NTSTATUS macdrv_dnd_get_data(void *arg) DECLSPEC_HIDDEN;
@@ -296,10 +288,6 @@ extern NTSTATUS macdrv_notify_icon(void *arg) DECLSPEC_HIDDEN;
 extern NTSTATUS macdrv_client_func(enum macdrv_client_funcs func, const void *params,
                                    ULONG size) DECLSPEC_HIDDEN;
 
-extern NTSTATUS WINAPI macdrv_dnd_query_drag(void *arg, ULONG size) DECLSPEC_HIDDEN;
-extern NTSTATUS WINAPI macdrv_dnd_query_drop(void *arg, ULONG size) DECLSPEC_HIDDEN;
-extern NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size) DECLSPEC_HIDDEN;
-
 /* user helpers */
 
 static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
diff --git a/dlls/winemac.drv/macdrv_dll.h b/dlls/winemac.drv/macdrv_dll.h
new file mode 100644
index 00000000000..3a11528eabc
--- /dev/null
+++ b/dlls/winemac.drv/macdrv_dll.h
@@ -0,0 +1,39 @@
+/*
+ * MAC driver definitions
+ *
+ * Copyright 2022 Jacek Caban for CodeWeavers
+ *
+ * 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 __WINE_MACDRV_DLL_H
+#define __WINE_MACDRV_DLL_H
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "ntgdi.h"
+#include "unixlib.h"
+
+extern NTSTATUS WINAPI macdrv_dnd_query_drag(void *arg, ULONG size) DECLSPEC_HIDDEN;
+extern NTSTATUS WINAPI macdrv_dnd_query_drop(void *arg, ULONG size) DECLSPEC_HIDDEN;
+extern NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size) DECLSPEC_HIDDEN;
+
+extern NTSTATUS WINAPI macdrv_ime_set_text(void *params, ULONG size) DECLSPEC_HIDDEN;
+extern NTSTATUS WINAPI macdrv_ime_query_char_rect(void *params, ULONG size) DECLSPEC_HIDDEN;
+
+extern HMODULE macdrv_module DECLSPEC_HIDDEN;
+
+#endif /* __WINE_MACDRV_DLL_H */
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/177



More information about the wine-devel mailing list