ntdll: Use the standard unixlib macro for Unix calls.

This commit is contained in:
Alexandre Julliard 2023-02-14 13:00:40 +01:00
parent 0ac2166cec
commit 157be05143
6 changed files with 9 additions and 11 deletions

View file

@ -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, &params )))
if ((status = WINE_UNIX_CALL( unix_load_so_dll, &params )))
{
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;

View file

@ -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, &params );
status = WINE_UNIX_CALL( unix_unwind_builtin_dll, &params );
if (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame)

View file

@ -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, &params );
status = WINE_UNIX_CALL( unix_unwind_builtin_dll, &params );
if (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame)

View file

@ -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, &params );
status = WINE_UNIX_CALL( unix_unwind_builtin_dll, &params );
if (!status && dispatch->LanguageHandler && !module)
{
FIXME( "calling personality routine in system library not supported yet\n" );

View file

@ -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;
}

View file

@ -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 */