Commit 157be051 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the standard unixlib macro for Unix calls.

parent 0ac2166c
...@@ -77,7 +77,7 @@ static DWORD (WINAPI *pCtrlRoutine)(void *); ...@@ -77,7 +77,7 @@ static DWORD (WINAPI *pCtrlRoutine)(void *);
SYSTEM_DLL_INIT_BLOCK LdrSystemDllInitBlock = { 0xf0 }; SYSTEM_DLL_INIT_BLOCK LdrSystemDllInitBlock = { 0xf0 };
unixlib_handle_t ntdll_unix_handle = 0; unixlib_handle_t __wine_unixlib_handle = 0;
/* windows directory */ /* windows directory */
const WCHAR windows_dir[] = L"C:\\windows"; const WCHAR windows_dir[] = L"C:\\windows";
...@@ -2627,7 +2627,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, ...@@ -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 }; struct load_so_dll_params params = { *nt_name, &module };
TRACE( "trying %s as so lib\n", debugstr_us(nt_name) ); 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) ); WARN( "failed to load .so lib %s\n", debugstr_us(nt_name) );
if (status == STATUS_INVALID_IMAGE_FORMAT) status = STATUS_INVALID_IMAGE_NOT_MZ; 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 ...@@ -3153,7 +3153,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, DWORD fl
switch (nts) switch (nts)
{ {
case STATUS_INVALID_IMAGE_NOT_MZ: /* not in PE format, maybe it's a .so file */ 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; break;
case STATUS_SUCCESS: /* valid PE file */ case STATUS_SUCCESS: /* valid PE file */
...@@ -4121,7 +4121,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR ...@@ -4121,7 +4121,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation, NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation,
&meminfo, sizeof(meminfo), NULL ); &meminfo, sizeof(meminfo), NULL );
NtQueryVirtualMemory( GetCurrentProcess(), meminfo.AllocationBase, MemoryWineUnixFuncs, 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->LdrData = &ldr;
peb->FastPebLock = &peb_lock; peb->FastPebLock = &peb_lock;
......
...@@ -165,7 +165,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX ...@@ -165,7 +165,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
{ {
struct unwind_builtin_dll_params params = { type, dispatch, context }; 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 (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame) if (dispatch->EstablisherFrame)
......
...@@ -199,7 +199,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX ...@@ -199,7 +199,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
{ {
struct unwind_builtin_dll_params params = { type, dispatch, context }; 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 (status != STATUS_SUCCESS) return status;
if (dispatch->EstablisherFrame) if (dispatch->EstablisherFrame)
......
...@@ -282,7 +282,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX ...@@ -282,7 +282,7 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
{ {
struct unwind_builtin_dll_params params = { type, dispatch, context }; 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) if (!status && dispatch->LanguageHandler && !module)
{ {
FIXME( "calling personality routine in system library not supported yet\n" ); FIXME( "calling personality routine in system library not supported yet\n" );
......
...@@ -374,7 +374,7 @@ LONGLONG WINAPI RtlGetSystemTimePrecise( void ) ...@@ -374,7 +374,7 @@ LONGLONG WINAPI RtlGetSystemTimePrecise( void )
{ {
LONGLONG ret; LONGLONG ret;
NTDLL_UNIX_CALL( system_time_precise, &ret ); WINE_UNIX_CALL( unix_system_time_precise, &ret );
return ret; return ret;
} }
......
...@@ -45,8 +45,6 @@ enum ntdll_unix_funcs ...@@ -45,8 +45,6 @@ enum ntdll_unix_funcs
unix_system_time_precise, unix_system_time_precise,
}; };
extern unixlib_handle_t ntdll_unix_handle; extern unixlib_handle_t __wine_unixlib_handle DECLSPEC_HIDDEN;
#define NTDLL_UNIX_CALL( func, params ) __wine_unix_call_dispatcher( ntdll_unix_handle, unix_ ## func, params )
#endif /* __NTDLL_UNIXLIB_H */ #endif /* __NTDLL_UNIXLIB_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment