Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d10410ea
Commit
d10410ea
authored
Dec 02, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add fallback implementations for the Unix library functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1b447409
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
15 deletions
+48
-15
loader.c
dlls/ntdll/loader.c
+38
-2
loader.c
dlls/ntdll/unix/loader.c
+4
-4
unixlib.h
dlls/ntdll/unixlib.h
+6
-9
No files found.
dlls/ntdll/loader.c
View file @
d10410ea
...
...
@@ -76,8 +76,6 @@ static DWORD (WINAPI *pCtrlRoutine)(void *);
SYSTEM_DLL_INIT_BLOCK
LdrSystemDllInitBlock
=
{
0xf0
};
const
struct
unix_funcs
*
unix_funcs
=
NULL
;
/* windows directory */
const
WCHAR
windows_dir
[]
=
L"C:
\\
windows"
;
/* system directory with trailing backslash */
...
...
@@ -4443,6 +4441,44 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
}
static
NTSTATUS
CDECL
load_so_dll_fallback
(
UNICODE_STRING
*
nt_name
,
void
**
module
)
{
return
STATUS_INVALID_IMAGE_FORMAT
;
}
static
void
CDECL
init_builtin_dll_fallback
(
void
*
module
)
{
}
static
NTSTATUS
CDECL
init_unix_lib_fallback
(
void
*
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
)
{
return
STATUS_DLL_NOT_FOUND
;
}
static
NTSTATUS
CDECL
unwind_builtin_dll_fallback
(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
{
return
STATUS_UNSUCCESSFUL
;
}
static
LONGLONG
WINAPI
RtlGetSystemTimePrecise_fallback
(
void
)
{
LARGE_INTEGER
now
;
NtQuerySystemTime
(
&
now
);
return
now
.
QuadPart
;
}
static
const
struct
unix_funcs
unix_fallbacks
=
{
load_so_dll_fallback
,
init_builtin_dll_fallback
,
init_unix_lib_fallback
,
unwind_builtin_dll_fallback
,
RtlGetSystemTimePrecise_fallback
,
};
const
struct
unix_funcs
*
unix_funcs
=
&
unix_fallbacks
;
/***********************************************************************
* __wine_set_unix_funcs
*/
...
...
dlls/ntdll/unix/loader.c
View file @
d10410ea
...
...
@@ -2156,14 +2156,14 @@ static ULONG_PTR get_image_address(void)
*/
static
struct
unix_funcs
unix_funcs
=
{
#ifdef __aarch64__
NtCurrentTeb
,
#endif
RtlGetSystemTimePrecise
,
load_so_dll
,
init_builtin_dll
,
init_unix_lib
,
unwind_builtin_dll
,
RtlGetSystemTimePrecise
,
#ifdef __aarch64__
NtCurrentTeb
,
#endif
};
...
...
dlls/ntdll/unixlib.h
View file @
d10410ea
...
...
@@ -26,24 +26,21 @@
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 13
2
#define NTDLL_UNIXLIB_VERSION 13
3
struct
unix_funcs
{
/* Nt* functions */
#ifdef __aarch64__
TEB
*
(
WINAPI
*
NtCurrentTeb
)(
void
);
#endif
/* other Win32 API functions */
LONGLONG
(
WINAPI
*
RtlGetSystemTimePrecise
)(
void
);
/* loader functions */
NTSTATUS
(
CDECL
*
load_so_dll
)(
UNICODE_STRING
*
nt_name
,
void
**
module
);
void
(
CDECL
*
init_builtin_dll
)(
void
*
module
);
NTSTATUS
(
CDECL
*
init_unix_lib
)(
void
*
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
);
NTSTATUS
(
CDECL
*
unwind_builtin_dll
)(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
);
/* other Win32 API functions */
LONGLONG
(
WINAPI
*
RtlGetSystemTimePrecise
)(
void
);
#ifdef __aarch64__
TEB
*
(
WINAPI
*
NtCurrentTeb
)(
void
);
#endif
};
#endif
/* __NTDLL_UNIXLIB_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment