Rebase against 948a6a47b8dbd0ddd86cad04de03f0e4ba81b65d.

This commit is contained in:
Zebediah Figura
2020-06-12 18:15:13 -05:00
parent eb4f9db59c
commit b6595d9e28
23 changed files with 509 additions and 744 deletions

View File

@@ -1,4 +1,4 @@
From 531ffc16d33f96bfeb65973efd1cdbd22fb6a32f Mon Sep 17 00:00:00 2001
From 607a86f034677449a7fa4628ec2df013b65bfa90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 11 May 2017 05:32:55 +0200
Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
@@ -22,10 +22,10 @@ Based on a patch by Erich E. Hoover.
14 files changed, 221 insertions(+), 32 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 2553b0b9d39..cac6aae2f3d 100644
index c2e65c94abc..0f9fe76e9af 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4021,6 +4021,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
@@ -3812,6 +3812,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
return ret;
}
@@ -33,7 +33,7 @@ index 2553b0b9d39..cac6aae2f3d 100644
/******************************************************************
* LdrInitializeThunk (NTDLL.@)
@@ -4038,6 +4039,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3828,6 +3829,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
WINE_MODREF *wm;
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
@@ -65,7 +65,7 @@ index 21cc1b3ead4..18be5693a7d 100644
}
return unix_funcs->NtGetContextThread( handle, context );
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 1389a542cde..54796476e25 100644
index a5e6faa461a..51938bf84cc 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1643,6 +1643,8 @@ static void test_thread_context(void)
@@ -78,10 +78,10 @@ index 1389a542cde..54796476e25 100644
ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index ff5fe9d6226..e93498b27ea 100644
index 5a6809638ae..c6988ce08e3 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -220,6 +220,14 @@ int __cdecl __wine_dbg_output( const char *str )
@@ -170,6 +170,14 @@ int __cdecl __wine_dbg_output( const char *str )
return unix_funcs->dbg_output( str );
}
@@ -96,7 +96,7 @@ index ff5fe9d6226..e93498b27ea 100644
/***********************************************************************
* thread_init
@@ -231,7 +239,7 @@ int __cdecl __wine_dbg_output( const char *str )
@@ -181,7 +189,7 @@ int __cdecl __wine_dbg_output( const char *str )
TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
{
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
@@ -127,10 +127,10 @@ index 97b191e1a5b..2dbaa43e731 100644
thread_data->request_fd = -1;
thread_data->reply_fd = -1;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index e26a64fdac0..e93d8f21d10 100644
index abedfc316ae..62d0c115026 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -112,7 +112,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
@@ -111,7 +111,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
BOOL *suspend, unsigned int *cpus, BOOL *wow64,
@@ -140,19 +140,19 @@ index e26a64fdac0..e93d8f21d10 100644
extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 768ab5b006c..63d0a519b74 100644
index 873cc7abdf2..c6fb8e0f2d4 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -28,7 +28,7 @@ struct ldt_copy;
struct msghdr;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 41
+#define NTDLL_UNIXLIB_VERSION 42
-#define NTDLL_UNIXLIB_VERSION 44
+#define NTDLL_UNIXLIB_VERSION 45
struct unix_funcs
{
@@ -204,7 +204,7 @@ struct unix_funcs
@@ -225,7 +225,7 @@ struct unix_funcs
/* thread/process functions */
TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
@@ -162,10 +162,10 @@ index 768ab5b006c..63d0a519b74 100644
void (CDECL *exit_process)( int status );
NTSTATUS (CDECL *get_thread_ldt_entry)( HANDLE handle, void *data, ULONG len, ULONG *ret_len );
diff --git a/include/winternl.h b/include/winternl.h
index 2d9f54b89d8..0c15a0ee6c3 100644
index 04e5dd1f62f..2b9a12cbb31 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -360,7 +360,7 @@ typedef struct _TEB
@@ -359,7 +359,7 @@ typedef struct _TEB
PVOID CsrClientThread; /* 03c/0070 */
PVOID Win32ThreadInfo; /* 040/0078 */
ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
@@ -559,5 +559,5 @@ index 2a1fc960926..07a579004ad 100644
+ return j + 1;
+}
--
2.26.2
2.27.0