Rebase against 53cb28e6d9daa7cbcc190cd02aeaba37c297adc4.

This commit is contained in:
Alistair Leslie-Hughes 2022-02-22 10:08:48 +11:00
parent 99c88fee27
commit d260d1fe3c
4 changed files with 2 additions and 131 deletions

View File

@ -1,112 +0,0 @@
From 5b1520dd617c454ac8e482260b6b437f6f98d185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 01:06:26 +0200
Subject: [PATCH] ntdll: Add dummy apiset to PEB.
---
dlls/ntdll/loader.c | 2 ++
include/Makefile.in | 1 +
include/apiset.h | 37 +++++++++++++++++++++++++++++++++++++
include/winternl.h | 3 ++-
4 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 include/apiset.h
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 7a714a5aa6d..62d1b38f4c0 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -164,6 +164,7 @@ static PEB_LDR_DATA ldr =
static RTL_BITMAP tls_bitmap;
static RTL_BITMAP tls_expansion_bitmap;
+static API_SET_NAMESPACE_ARRAY apiset_map;
static WINE_MODREF *cached_modref;
static WINE_MODREF *current_modref;
@@ -3626,6 +3627,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
peb->LdrData = &ldr;
peb->FastPebLock = &peb_lock;
+ peb->ApiSetMap = &apiset_map;
peb->TlsBitmap = &tls_bitmap;
peb->TlsExpansionBitmap = &tls_expansion_bitmap;
peb->LoaderLock = &loader_section;
diff --git a/include/Makefile.in b/include/Makefile.in
index 9133e5c6315..f56a60fae5e 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -15,6 +15,7 @@ SOURCES = \
amsi.idl \
amstream.idl \
amvideo.idl \
+ apiset.h \
appcompatapi.h \
appmgmt.h \
appmodel.h \
diff --git a/include/apiset.h b/include/apiset.h
new file mode 100644
index 00000000000..6801cd5f509
--- /dev/null
+++ b/include/apiset.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#ifndef _API_SET_H_
+#define _API_SET_H_
+
+#include <windef.h>
+
+typedef struct _API_SET_NAMESPACE_ENTRY
+{
+ ULONG NameOffset;
+ ULONG NameLength;
+ ULONG DataOffset;
+} API_SET_NAMESPACE_ENTRY, *PAPI_SET_NAMESPACE_ENTRY;
+
+typedef struct _API_SET_NAMESPACE_ARRAY
+{
+ ULONG Version;
+ ULONG Count;
+ API_SET_NAMESPACE_ENTRY Array[1];
+} API_SET_NAMESPACE_ARRAY, *PAPI_SET_NAMESPACE_ARRAY;
+
+#endif
diff --git a/include/winternl.h b/include/winternl.h
index 298ebbc2d36..163b7737e00 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -23,6 +23,7 @@
#include <ntdef.h>
#include <windef.h>
+#include <apiset.h>
#ifdef __cplusplus
extern "C" {
@@ -321,7 +322,7 @@ typedef struct _PEB
PVOID KernelCallbackTable; /* 02c/058 */
ULONG Reserved; /* 030/060 */
ULONG AtlThunkSListPtr32; /* 034/064 */
- PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */
+ PAPI_SET_NAMESPACE_ARRAY ApiSetMap; /* 038/068 */
ULONG TlsExpansionCounter; /* 03c/070 */
PRTL_BITMAP TlsBitmap; /* 040/078 */
ULONG TlsBitmapBits[2]; /* 044/080 */
--
2.30.2

View File

@ -1 +0,0 @@
Fixes: [44658] Add dummy apiset to PEB struct

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "bf42dca35f05bce9996e91f59cc47b5a9e6996b2"
echo "53cb28e6d9daa7cbcc190cd02aeaba37c297adc4"
}
# Show version information
@ -135,7 +135,6 @@ patch_enable_all ()
enable_msi_msi_vcl_get_cost="$1"
enable_msxml3_FreeThreadedXMLHTTP60="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_ApiSetMap="$1"
enable_ntdll_Builtin_Prot="$1"
enable_ntdll_CriticalSection="$1"
enable_ntdll_DOS_Attributes="$1"
@ -435,9 +434,6 @@ patch_enable ()
ntdll-APC_Performance)
enable_ntdll_APC_Performance="$2"
;;
ntdll-ApiSetMap)
enable_ntdll_ApiSetMap="$2"
;;
ntdll-Builtin_Prot)
enable_ntdll_Builtin_Prot="$2"
;;
@ -2327,18 +2323,6 @@ if test "$enable_ntdll_APC_Performance" -eq 1; then
patch_apply ntdll-APC_Performance/0001-ntdll-Reuse-old-async-fileio-structures-if-possible.patch
fi
# Patchset ntdll-ApiSetMap
# |
# | This patchset fixes the following Wine bugs:
# | * [#44658] Add dummy apiset to PEB struct
# |
# | Modified files:
# | * dlls/ntdll/loader.c, include/Makefile.in, include/apiset.h, include/winternl.h
# |
if test "$enable_ntdll_ApiSetMap" -eq 1; then
patch_apply ntdll-ApiSetMap/0001-ntdll-Add-dummy-apiset-to-PEB.patch
fi
# Patchset ntdll-ForceBottomUpAlloc
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1 +1 @@
bf42dca35f05bce9996e91f59cc47b5a9e6996b2
53cb28e6d9daa7cbcc190cd02aeaba37c297adc4