From: Jacek Caban jacek@codeweavers.com
--- dlls/winemac.drv/dllmain.c | 7 ++----- dlls/winemac.drv/macdrv_main.c | 12 ------------ dlls/winemac.drv/unixlib.h | 6 ++---- 3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c index 567485b2f03..ac03ec360ce 100644 --- a/dlls/winemac.drv/dllmain.c +++ b/dlls/winemac.drv/dllmain.c @@ -27,8 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
HMODULE macdrv_module = 0; -static unixlib_handle_t macdrv_handle; -NTSTATUS (CDECL *macdrv_unix_call)(enum macdrv_funcs code, void *params); +unixlib_handle_t macdrv_handle;
struct quit_info { HWND *wins; @@ -414,12 +413,10 @@ static BOOL process_attach(void) str->len = LoadStringW(macdrv_module, str->id, (WCHAR *)&str->str, 0); params.strings = strings;
- if (__wine_unix_call(macdrv_handle, unix_init, ¶ms)) return FALSE; + if (MACDRV_CALL(init, ¶ms)) return FALSE;
callback_table = NtCurrentTeb()->Peb->KernelCallbackTable; memcpy( callback_table + NtUserDriverCallbackFirst, kernel_callbacks, sizeof(kernel_callbacks) ); - - macdrv_unix_call = params.unix_call; return TRUE; }
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 4b79c69a6f8..7cca25cf302 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -429,9 +429,6 @@ static void load_strings(struct localized_string *str) }
-static NTSTATUS CDECL unix_call( enum macdrv_funcs code, void *params ); - - /*********************************************************************** * macdrv_init */ @@ -458,8 +455,6 @@ static NTSTATUS macdrv_init(void *arg)
init_user_driver(); macdrv_init_display_devices(FALSE); - - params->unix_call = unix_call; return STATUS_SUCCESS; }
@@ -658,10 +653,3 @@ const unixlib_entry_t __wine_unix_call_funcs[] = };
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); - - -/* FIXME: Use __wine_unix_call instead */ -static NTSTATUS CDECL unix_call(enum macdrv_funcs code, void *params) -{ - return __wine_unix_call_funcs[code]( params ); -} diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index d162732b08e..c5e71e188fa 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -35,9 +35,8 @@ enum macdrv_funcs unix_funcs_count };
-/* FIXME: Use __wine_unix_call when the rest of the stack is ready */ -extern NTSTATUS (CDECL *macdrv_unix_call)(enum macdrv_funcs code, void *params) DECLSPEC_HIDDEN; -#define MACDRV_CALL(func, params) macdrv_unix_call(unix_ ## func, params) +extern unixlib_handle_t macdrv_handle DECLSPEC_HIDDEN; +#define MACDRV_CALL(func, params) __wine_unix_call(macdrv_handle, unix_ ## func, params)
/* macdrv_dnd_get_data params */ struct dnd_get_data_params @@ -84,7 +83,6 @@ struct localized_string struct init_params { struct localized_string *strings; - NTSTATUS (CDECL *unix_call)(enum macdrv_funcs code, void *params); };
/* macdrv_notify_icon params */