Module: wine Branch: master Commit: 157be051439f2414bc241b0dcb2ef0d4e83b8a78 URL: https://gitlab.winehq.org/wine/wine/-/commit/157be051439f2414bc241b0dcb2ef0d...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Feb 14 13:00:40 2023 +0100
ntdll: Use the standard unixlib macro for Unix calls.
---
dlls/ntdll/loader.c | 8 ++++---- dlls/ntdll/signal_arm.c | 2 +- dlls/ntdll/signal_arm64.c | 2 +- dlls/ntdll/signal_x86_64.c | 2 +- dlls/ntdll/time.c | 2 +- dlls/ntdll/unixlib.h | 4 +--- 6 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 7661227e951..60ff36f4211 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -77,7 +77,7 @@ static DWORD (WINAPI *pCtrlRoutine)(void *);
SYSTEM_DLL_INIT_BLOCK LdrSystemDllInitBlock = { 0xf0 };
-unixlib_handle_t ntdll_unix_handle = 0; +unixlib_handle_t __wine_unixlib_handle = 0;
/* windows directory */ const WCHAR windows_dir[] = L"C:\windows"; @@ -2627,7 +2627,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, struct load_so_dll_params params = { *nt_name, &module };
TRACE( "trying %s as so lib\n", debugstr_us(nt_name) ); - if ((status = NTDLL_UNIX_CALL( load_so_dll, ¶ms ))) + if ((status = WINE_UNIX_CALL( unix_load_so_dll, ¶ms ))) { WARN( "failed to load .so lib %s\n", debugstr_us(nt_name) ); if (status == STATUS_INVALID_IMAGE_FORMAT) status = STATUS_INVALID_IMAGE_NOT_MZ; @@ -3153,7 +3153,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD fl switch (nts) { case STATUS_INVALID_IMAGE_NOT_MZ: /* not in PE format, maybe it's a .so file */ - if (ntdll_unix_handle) nts = load_so_dll( load_path, &nt_name, flags, pwm ); + if (__wine_unixlib_handle) nts = load_so_dll( load_path, &nt_name, flags, pwm ); break;
case STATUS_SUCCESS: /* valid PE file */ @@ -4121,7 +4121,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation, &meminfo, sizeof(meminfo), NULL ); NtQueryVirtualMemory( GetCurrentProcess(), meminfo.AllocationBase, MemoryWineUnixFuncs, - &ntdll_unix_handle, sizeof(ntdll_unix_handle), NULL ); + &__wine_unixlib_handle, sizeof(__wine_unixlib_handle), NULL );
peb->LdrData = &ldr; peb->FastPebLock = &peb_lock; diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index b426e03ff0e..47b535b69c5 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -165,7 +165,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX { struct unwind_builtin_dll_params params = { type, dispatch, context };
- status = NTDLL_UNIX_CALL( unwind_builtin_dll, ¶ms ); + status = WINE_UNIX_CALL( unix_unwind_builtin_dll, ¶ms ); if (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index bdf58dfba01..cadf774be67 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -199,7 +199,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX { struct unwind_builtin_dll_params params = { type, dispatch, context };
- status = NTDLL_UNIX_CALL( unwind_builtin_dll, ¶ms ); + status = WINE_UNIX_CALL( unix_unwind_builtin_dll, ¶ms ); if (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index ac543338893..81479f1fd91 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -282,7 +282,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX { struct unwind_builtin_dll_params params = { type, dispatch, context };
- status = NTDLL_UNIX_CALL( unwind_builtin_dll, ¶ms ); + status = WINE_UNIX_CALL( unix_unwind_builtin_dll, ¶ms ); if (!status && dispatch->LanguageHandler && !module) { FIXME( "calling personality routine in system library not supported yet\n" ); diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index 0a4ff0f64d3..1c7f20c434e 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -374,7 +374,7 @@ LONGLONG WINAPI RtlGetSystemTimePrecise( void ) { LONGLONG ret;
- NTDLL_UNIX_CALL( system_time_precise, &ret ); + WINE_UNIX_CALL( unix_system_time_precise, &ret ); return ret; }
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h index 0b4c2a984bb..edbfb1f19b3 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h @@ -45,8 +45,6 @@ enum ntdll_unix_funcs unix_system_time_precise, };
-extern unixlib_handle_t ntdll_unix_handle; - -#define NTDLL_UNIX_CALL( func, params ) __wine_unix_call_dispatcher( ntdll_unix_handle, unix_ ## func, params ) +extern unixlib_handle_t __wine_unixlib_handle DECLSPEC_HIDDEN;
#endif /* __NTDLL_UNIXLIB_H */