[vlc-commits] [Git][videolan/vlc][master] contrib: mingw64: update patches from upstream

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Jun 18 02:45:14 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
88d40b7a by Steve Lhomme at 2023-06-17T15:53:21+00:00
contrib: mingw64: update patches from upstream

- - - - -


18 changed files:

- + contrib/src/mingw64/0001-headers-enable-GetFileInformationByHandle-in-Win10-U.patch
- contrib/src/mingw64/0001-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch → contrib/src/mingw64/0002-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch
- contrib/src/mingw64/0001-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch → contrib/src/mingw64/0003-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch
- contrib/src/mingw64/0001-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch → contrib/src/mingw64/0004-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch
- contrib/src/mingw64/0004-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch → contrib/src/mingw64/0005-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch
- contrib/src/mingw64/0006-headers-enable-more-module-API-in-Win10-19H1-UWP-bui.patch
- contrib/src/mingw64/0008-crt-add-api-ms-core-registry-def-files.patch → contrib/src/mingw64/0007-crt-add-api-ms-core-registry-def-files.patch
- contrib/src/mingw64/0009-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch → contrib/src/mingw64/0008-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch
- contrib/src/mingw64/0001-headers-only-enable-GetFileInformationByHandle-for-1.patch → contrib/src/mingw64/0009-headers-only-enable-GetFileInformationByHandle-for-1.patch
- contrib/src/mingw64/0010-headers-allow-Get-SetHandleInformation-in-Win10-19H1.patch
- + contrib/src/mingw64/0011-crt-add-missing-api-ms-win-core-heap-l1-1-0.patch
- + contrib/src/mingw64/0012-headers-Allow-some-Heap-API-in-Win10-19H1-UWP-builds.patch
- + contrib/src/mingw64/0013-headers-enable-FindResourceW-in-Win10-19H1-UWP-build.patch
- contrib/src/mingw64/0001-headers-check-which-version-of-UWP-Windows-contains-.patch → contrib/src/mingw64/0014-headers-check-which-version-of-UWP-Windows-contains-.patch
- contrib/src/mingw64/0001-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch → contrib/src/mingw64/0015-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch
- + contrib/src/mingw64/0016-headers-Allow-SetDllDirectoryW-A-API-in-Win10-19H1-U.patch
- + contrib/src/mingw64/0017-headers-allow-FORMAT_MESSAGE_ALLOCATE_BUFFER-in-UWP.patch
- contrib/src/mingw64/rules.mak


Changes:

=====================================
contrib/src/mingw64/0001-headers-enable-GetFileInformationByHandle-in-Win10-U.patch
=====================================
@@ -0,0 +1,30 @@
+From d6b24ec2508f10dadbe9ccd8789b22ed1c0832bb Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 24 May 2023 08:30:19 +0200
+Subject: [PATCH 01/17] headers: enable GetFileInformationByHandle in Win10 UWP
+ builds
+
+Contrary to what the documentation says, it's available in the Windows SDK,
+both in the headers and when linking with WindowsApp.lib.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-headers/include/fileapi.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mingw-w64-headers/include/fileapi.h b/mingw-w64-headers/include/fileapi.h
+index ffbe12560..8ea09f6c9 100644
+--- a/mingw-w64-headers/include/fileapi.h
++++ b/mingw-w64-headers/include/fileapi.h
+@@ -32,7 +32,7 @@ WINBASEAPI DWORD WINAPI GetFileAttributesW (LPCWSTR lpFileName);
+ #define GetFileAttributes __MINGW_NAME_AW(GetFileAttributes)
+ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod);
+ #endif
+-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT)
++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
+   typedef struct _BY_HANDLE_FILE_INFORMATION {
+     DWORD dwFileAttributes;
+     FILETIME ftCreationTime;
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/0001-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch → contrib/src/mingw64/0002-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch
=====================================
@@ -1,11 +1,13 @@
-From 9559b683801027a3a944b60dd4c7b49debbcb66e Mon Sep 17 00:00:00 2001
+From 7669cac6e5266b8bb0a23cf6dbdcd0511aaee52c Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 25 May 2023 08:19:26 +0200
-Subject: [PATCH] headers: enable VirtualAlloc(Ex) in Win10 UWP builds
+Date: Thu, 25 May 2023 08:31:24 +0200
+Subject: [PATCH 02/17] headers: enable VirtualAlloc(Ex) in Win10 UWP builds
 
 It is now officially allowed [1].
 
 [1] https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/memoryapi.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)


=====================================
contrib/src/mingw64/0001-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch → contrib/src/mingw64/0003-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch
=====================================
@@ -1,7 +1,7 @@
-From de5009b7952c6c74511facef02c3d21855b4ee0e Mon Sep 17 00:00:00 2001
+From 25beff61340b108d6b6fc4054c9a30a6f4fea281 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Sat, 27 May 2023 11:52:25 +0200
-Subject: [PATCH] headers: enable GetVolumePathNameW in Win10 UWP builds
+Date: Sat, 27 May 2023 12:05:37 +0200
+Subject: [PATCH 03/17] headers: enable GetVolumePathNameW in Win10 UWP builds
 
 The documentation doesn't say it's allowed, but the WIndows SDK allow it and
 the Windows App Certification as well.
@@ -10,6 +10,8 @@ The official page for allowed API's also doesn't say it's allowed [1]
 but the DLL that contains it is there.
 
 [1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/fileapi.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


=====================================
contrib/src/mingw64/0001-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch → contrib/src/mingw64/0004-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch
=====================================
@@ -1,16 +1,18 @@
-From 5ce33c808919cc129fe04fa306ca64cdd9762248 Mon Sep 17 00:00:00 2001
+From 0ed84b9108a3a13dd7a7fb881ff1e4e82d6b19f1 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 30 May 2023 15:52:28 +0200
-Subject: [PATCH] headers: enable GET_MODULE_HANDLE_EX_xxx defines in UWP
+Date: Wed, 31 May 2023 07:44:13 +0200
+Subject: [PATCH 04/17] headers: enable GET_MODULE_HANDLE_EX_xxx defines in UWP
  builds
 
 It's available in the Windows 11 SDK for all builds targeting FAMILY_APP and more.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/libloaderapi.h | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h
-index 26115ad9e..2705c18a4 100644
+index d4c82ef8c..00070da2e 100644
 --- a/mingw-w64-headers/include/libloaderapi.h
 +++ b/mingw-w64-headers/include/libloaderapi.h
 @@ -79,11 +79,13 @@ extern "C" {


=====================================
contrib/src/mingw64/0004-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch → contrib/src/mingw64/0005-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch
=====================================
@@ -1,7 +1,7 @@
-From b7ce09e8a811dc60e4c6ca68ca60773757b6cf20 Mon Sep 17 00:00:00 2001
+From ae87f01321d98012576270bd85ee59fe2096fb92 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 25 May 2023 09:44:35 +0200
-Subject: [PATCH 04/10] headers: enable CreateHardLinkW in Win10 19H1 UWP
+Date: Thu, 1 Jun 2023 15:27:53 +0200
+Subject: [PATCH 05/17] headers: enable CreateHardLinkW in Win10 19H1 UWP
  builds
 
 The documentation doesn't say it's allowed but they are allowed by the
@@ -14,6 +14,8 @@ be used when targeting older Windows 10 versions in UWP mode.
 We already have api-ms-win-core-file-l2-1-0 in mincore and windowsapp.
 
 [1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/winbase.h | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)


=====================================
contrib/src/mingw64/0006-headers-enable-more-module-API-in-Win10-19H1-UWP-bui.patch
=====================================
@@ -1,7 +1,7 @@
-From c9bb6512f22df36c104d1539ed1de52b8d41b322 Mon Sep 17 00:00:00 2001
+From 0fbadbc7253a0376bfccd13a150d7f422ed63109 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 30 May 2023 14:42:07 +0200
-Subject: [PATCH 06/10] headers: enable more module API in Win10 19H1 UWP
+Date: Thu, 1 Jun 2023 15:28:53 +0200
+Subject: [PATCH 06/17] headers: enable more module API in Win10 19H1 UWP
  builds
 
 The documentation doesn't say it's allowed but they are allowed by the
@@ -14,12 +14,14 @@ be used when targeting older Windows 10 versions in UWP mode.
 We already have api-ms-win-core-libraryloader-l1-2-0 in mincore and windowsapp.
 
 [1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/libloaderapi.h | 44 ++++++++++++++----------
  1 file changed, 26 insertions(+), 18 deletions(-)
 
 diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h
-index d4c82ef8c..c96e1a07b 100644
+index 00070da2e..25bacfd29 100644
 --- a/mingw-w64-headers/include/libloaderapi.h
 +++ b/mingw-w64-headers/include/libloaderapi.h
 @@ -37,11 +37,6 @@ extern "C" {
@@ -34,7 +36,7 @@ index d4c82ef8c..c96e1a07b 100644
    typedef PVOID DLL_DIRECTORY_COOKIE, *PDLL_DIRECTORY_COOKIE;
  
  #define FIND_RESOURCE_DIRECTORY_TYPES (0x0100)
-@@ -90,31 +85,21 @@ extern "C" {
+@@ -92,31 +87,21 @@ extern "C" {
  
    WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule, LPCWSTR lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG_PTR lParam);
    WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
@@ -66,7 +68,7 @@ index d4c82ef8c..c96e1a07b 100644
  
  #define EnumResourceLanguages __MINGW_NAME_AW(EnumResourceLanguages)
    WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam);
-@@ -136,11 +121,8 @@ extern "C" {
+@@ -138,11 +123,8 @@ extern "C" {
  #endif
  #endif
  #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT)
@@ -78,7 +80,7 @@ index d4c82ef8c..c96e1a07b 100644
  #define LoadLibrary __MINGW_NAME_AW(LoadLibrary)
  #endif
  
-@@ -176,6 +158,32 @@ typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR;
+@@ -178,6 +160,32 @@ typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR;
  #endif
  #endif
  


=====================================
contrib/src/mingw64/0008-crt-add-api-ms-core-registry-def-files.patch → contrib/src/mingw64/0007-crt-add-api-ms-core-registry-def-files.patch
=====================================
@@ -1,12 +1,14 @@
-From c6538fe93fcc5930e5ddf33ce910346787f09375 Mon Sep 17 00:00:00 2001
+From 71fabf70d06913e8e8eafd050ff9f177eb53f3c6 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 30 May 2023 16:54:31 +0200
-Subject: [PATCH 08/10] crt: add api-ms-core-registry-* def files
+Date: Thu, 1 Jun 2023 15:30:03 +0200
+Subject: [PATCH 07/17] crt: add api-ms-core-registry-* def files
 
 These are needed to enable the registry API calls available in UWP.
 
 Add the target DLL to windowsapp, but not mincore (Win8) where it doesn't
 exist.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-crt/Makefile.in                     |  2 +
  .../api-ms-win-core-registry-l1-1-0.def       | 47 +++++++++++++++++++
@@ -31,100 +33,100 @@ index 0454ecec3..cff260421 100644
  		%/libapi-ms-win-core-synch-ansi-l1-1-0.a \
 diff --git a/mingw-w64-crt/lib-common/api-ms-win-core-registry-l1-1-0.def b/mingw-w64-crt/lib-common/api-ms-win-core-registry-l1-1-0.def
 new file mode 100644
-index 000000000..5cb72046b
+index 000000000..2f01992ed
 --- /dev/null
 +++ b/mingw-w64-crt/lib-common/api-ms-win-core-registry-l1-1-0.def
 @@ -0,0 +1,47 @@
-+LIBRARY api-ms-win-core-registry-l1-1-0
-+
-+EXPORTS
-+
-+RegCloseKey
-+RegCopyTreeW
-+RegCreateKeyExA
-+RegCreateKeyExW
-+RegDeleteKeyExA
-+RegDeleteKeyExW
-+RegDeleteTreeA
-+RegDeleteTreeW
-+RegDeleteValueA
-+RegDeleteValueW
-+RegDisablePredefinedCacheEx
-+RegEnumKeyExA
-+RegEnumKeyExW
-+RegEnumValueA
-+RegEnumValueW
-+RegFlushKey
-+RegGetKeySecurity
-+RegGetValueA
-+RegGetValueW
-+RegLoadAppKeyA
-+RegLoadAppKeyW
-+RegLoadKeyA
-+RegLoadKeyW
-+RegLoadMUIStringA
-+RegLoadMUIStringW
-+RegNotifyChangeKeyValue
-+RegOpenCurrentUser
-+RegOpenKeyExA
-+RegOpenKeyExW
-+RegOpenUserClassesRoot
-+RegQueryInfoKeyA
-+RegQueryInfoKeyW
-+RegQueryValueExA
-+RegQueryValueExW
-+RegRestoreKeyA
-+RegRestoreKeyW
-+RegSaveKeyExA
-+RegSaveKeyExW
-+RegSetKeySecurity
-+RegSetValueExA
-+RegSetValueExW
-+RegUnLoadKeyA
-+RegUnLoadKeyW
++LIBRARY api-ms-win-core-registry-l1-1-0
++
++EXPORTS
++
++RegCloseKey
++RegCopyTreeW
++RegCreateKeyExA
++RegCreateKeyExW
++RegDeleteKeyExA
++RegDeleteKeyExW
++RegDeleteTreeA
++RegDeleteTreeW
++RegDeleteValueA
++RegDeleteValueW
++RegDisablePredefinedCacheEx
++RegEnumKeyExA
++RegEnumKeyExW
++RegEnumValueA
++RegEnumValueW
++RegFlushKey
++RegGetKeySecurity
++RegGetValueA
++RegGetValueW
++RegLoadAppKeyA
++RegLoadAppKeyW
++RegLoadKeyA
++RegLoadKeyW
++RegLoadMUIStringA
++RegLoadMUIStringW
++RegNotifyChangeKeyValue
++RegOpenCurrentUser
++RegOpenKeyExA
++RegOpenKeyExW
++RegOpenUserClassesRoot
++RegQueryInfoKeyA
++RegQueryInfoKeyW
++RegQueryValueExA
++RegQueryValueExW
++RegRestoreKeyA
++RegRestoreKeyW
++RegSaveKeyExA
++RegSaveKeyExW
++RegSetKeySecurity
++RegSetValueExA
++RegSetValueExW
++RegUnLoadKeyA
++RegUnLoadKeyW
 diff --git a/mingw-w64-crt/lib-common/api-ms-win-core-registry-l2-1-0.def b/mingw-w64-crt/lib-common/api-ms-win-core-registry-l2-1-0.def
 new file mode 100644
-index 000000000..3e05bbf74
+index 000000000..b35c308c4
 --- /dev/null
 +++ b/mingw-w64-crt/lib-common/api-ms-win-core-registry-l2-1-0.def
 @@ -0,0 +1,37 @@
-+LIBRARY api-ms-win-core-registry-l2-1-0
-+
-+EXPORTS
-+
-+RegConnectRegistryA
-+RegConnectRegistryW
-+RegCopyTreeA
-+RegCreateKeyA
-+RegCreateKeyTransactedA
-+RegCreateKeyTransactedW
-+RegCreateKeyW
-+RegDeleteKeyA
-+RegDeleteKeyTransactedA
-+RegDeleteKeyTransactedW
-+RegDeleteKeyValueA
-+RegDeleteKeyValueW
-+RegDeleteKeyW
-+RegDisablePredefinedCache
-+RegEnumKeyA
-+RegEnumKeyW
-+RegOpenKeyA
-+RegOpenKeyTransactedA
-+RegOpenKeyTransactedW
-+RegOpenKeyW
-+RegOverridePredefKey
-+RegQueryMultipleValuesA
-+RegQueryMultipleValuesW
-+RegQueryValueA
-+RegQueryValueW
-+RegReplaceKeyA
-+RegReplaceKeyW
-+RegSaveKeyA
-+RegSaveKeyW
-+RegSetKeyValueA
-+RegSetKeyValueW
-+RegSetValueA
-+RegSetValueW
++LIBRARY api-ms-win-core-registry-l2-1-0
++
++EXPORTS
++
++RegConnectRegistryA
++RegConnectRegistryW
++RegCopyTreeA
++RegCreateKeyA
++RegCreateKeyTransactedA
++RegCreateKeyTransactedW
++RegCreateKeyW
++RegDeleteKeyA
++RegDeleteKeyTransactedA
++RegDeleteKeyTransactedW
++RegDeleteKeyValueA
++RegDeleteKeyValueW
++RegDeleteKeyW
++RegDisablePredefinedCache
++RegEnumKeyA
++RegEnumKeyW
++RegOpenKeyA
++RegOpenKeyTransactedA
++RegOpenKeyTransactedW
++RegOpenKeyW
++RegOverridePredefKey
++RegQueryMultipleValuesA
++RegQueryMultipleValuesW
++RegQueryValueA
++RegQueryValueW
++RegReplaceKeyA
++RegReplaceKeyW
++RegSaveKeyA
++RegSaveKeyW
++RegSetKeyValueA
++RegSetKeyValueW
++RegSetValueA
++RegSetValueW
 diff --git a/mingw-w64-crt/lib-common/windowsapp.mri b/mingw-w64-crt/lib-common/windowsapp.mri
 index 8e0e3d888..2496280a5 100644
 --- a/mingw-w64-crt/lib-common/windowsapp.mri


=====================================
contrib/src/mingw64/0009-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch → contrib/src/mingw64/0008-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch
=====================================
@@ -1,7 +1,7 @@
-From 7bfb7d0537f1e1dc67a0993c96a92b6b26705315 Mon Sep 17 00:00:00 2001
+From f17aabd6ad7db49419950cbb456c8ecf64eba62a Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 30 May 2023 15:16:03 +0200
-Subject: [PATCH 09/10] headers: enable some Registry API calls in Win10 19H1
+Date: Thu, 1 Jun 2023 15:30:04 +0200
+Subject: [PATCH 08/17] headers: enable some Registry API calls in Win10 19H1
  UWP builds
 
 The documentation doesn't say it's allowed but they are allowed by the
@@ -13,6 +13,8 @@ function, so it should not be used when targeting older Windows 10 versions
 in UWP mode.
 
 We now have api-ms-win-core-registry-l1-1-0 in windowsapp.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/winreg.h | 92 ++++++++++++++++--------------
  1 file changed, 49 insertions(+), 43 deletions(-)


=====================================
contrib/src/mingw64/0001-headers-only-enable-GetFileInformationByHandle-for-1.patch → contrib/src/mingw64/0009-headers-only-enable-GetFileInformationByHandle-for-1.patch
=====================================
@@ -1,25 +1,27 @@
-From e769423cf0acfbda5810025a57942465110ed9ff Mon Sep 17 00:00:00 2001
+From 20619a25985e84980d8fdc1ff7828e5fdff42ff4 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 1 Jun 2023 11:49:51 +0200
-Subject: [PATCH 01/10] headers: only enable GetFileInformationByHandle for
+Date: Thu, 1 Jun 2023 15:31:43 +0200
+Subject: [PATCH 09/17] headers: only enable GetFileInformationByHandle for
  19H1 UWP builds
 
 It is not allowed in older SDK. It won't compile or won't link. The target DLL
 will likely not have the function, so it should not be used when targetting older
 Windows 10 versions in UWP mode.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/fileapi.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mingw-w64-headers/include/fileapi.h b/mingw-w64-headers/include/fileapi.h
-index ffbe12560..3640efd52 100644
+index e9e0c647f..8124bd5cc 100644
 --- a/mingw-w64-headers/include/fileapi.h
 +++ b/mingw-w64-headers/include/fileapi.h
 @@ -32,7 +32,7 @@ WINBASEAPI DWORD WINAPI GetFileAttributesW (LPCWSTR lpFileName);
  #define GetFileAttributes __MINGW_NAME_AW(GetFileAttributes)
  WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod);
  #endif
--#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT)
+-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
 +#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1 || defined(WINSTORECOMPAT)
    typedef struct _BY_HANDLE_FILE_INFORMATION {
      DWORD dwFileAttributes;


=====================================
contrib/src/mingw64/0010-headers-allow-Get-SetHandleInformation-in-Win10-19H1.patch
=====================================
@@ -1,7 +1,7 @@
-From d4758caa1d6ffc1f800dce06aa38f6d7a3b6d306 Mon Sep 17 00:00:00 2001
+From d598a2338f212cf88ae1ea54a2953ae3b2bd87d5 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Wed, 31 May 2023 13:55:51 +0200
-Subject: [PATCH 10/10] headers: allow Get/SetHandleInformation in Win10 19H1
+Date: Thu, 1 Jun 2023 15:32:15 +0200
+Subject: [PATCH 10/17] headers: allow Get/SetHandleInformation in Win10 19H1
  UWP builds
 
 The documentation doesn't say it's allowed but they are allowed by the
@@ -14,6 +14,8 @@ be used when targeting older Windows 10 versions in UWP mode.
 We already have api-ms-win-core-handle-l1-1-0 in mincore and windowsapp.
 
 [1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-handle-l1-1-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/handleapi.h | 2 +-
  mingw-w64-headers/include/winbase.h   | 5 ++---


=====================================
contrib/src/mingw64/0011-crt-add-missing-api-ms-win-core-heap-l1-1-0.patch
=====================================
@@ -0,0 +1,113 @@
+From 3f2dcd43490f263210a7a61ae1a7250c70cd9330 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 1 Jun 2023 15:33:39 +0200
+Subject: [PATCH 11/17] crt: add missing api-ms-win-core-heap-l1-1-0
+
+It was supposed to be in mincore already.
+
+The parameters size in lib32 were generated from values found in other .def
+files of lib32.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-crt/Makefile.in                     |  1 +
+ .../api-ms-win-core-heap-l1-1-0.def           | 20 +++++++++++++++++++
+ mingw-w64-crt/lib-common/mincore.mri          |  2 +-
+ mingw-w64-crt/lib-common/windowsapp.mri       |  1 +
+ .../lib32/api-ms-win-core-heap-l1-1-0.def     | 20 +++++++++++++++++++
+ 5 files changed, 43 insertions(+), 1 deletion(-)
+ create mode 100644 mingw-w64-crt/lib-common/api-ms-win-core-heap-l1-1-0.def
+ create mode 100644 mingw-w64-crt/lib32/api-ms-win-core-heap-l1-1-0.def
+
+diff --git a/mingw-w64-crt/Makefile.in b/mingw-w64-crt/Makefile.in
+index cff260421..3310b0a44 100644
+--- a/mingw-w64-crt/Makefile.in
++++ b/mingw-w64-crt/Makefile.in
+@@ -2206,6 +2206,7 @@ endif
+ 		%/libapi-ms-win-core-file-l2-1-0.a \
+ 		%/libapi-ms-win-core-file-l2-1-1.a \
+ 		%/libapi-ms-win-core-handle-l1-1-0.a \
++		%/libapi-ms-win-core-heap-l1-1-0.a \
+ 		%/libapi-ms-win-core-heap-l1-2-0.a \
+ 		%/libapi-ms-win-core-interlocked-l1-2-0.a \
+ 		%/libapi-ms-win-core-io-l1-1-0.a \
+diff --git a/mingw-w64-crt/lib-common/api-ms-win-core-heap-l1-1-0.def b/mingw-w64-crt/lib-common/api-ms-win-core-heap-l1-1-0.def
+new file mode 100644
+index 000000000..202bce3ac
+--- /dev/null
++++ b/mingw-w64-crt/lib-common/api-ms-win-core-heap-l1-1-0.def
+@@ -0,0 +1,20 @@
++LIBRARY api-ms-win-core-heap-l1-1-0
++
++EXPORTS
++
++GetProcessHeap
++GetProcessHeaps
++HeapAlloc
++HeapCompact
++HeapCreate
++HeapDestroy
++HeapFree
++HeapLock
++HeapQueryInformation
++HeapReAlloc
++HeapSetInformation
++HeapSize
++HeapSummary
++HeapUnlock
++HeapValidate
++HeapWalk
+diff --git a/mingw-w64-crt/lib-common/mincore.mri b/mingw-w64-crt/lib-common/mincore.mri
+index 7073eeb8d..27f5f50c9 100644
+--- a/mingw-w64-crt/lib-common/mincore.mri
++++ b/mingw-w64-crt/lib-common/mincore.mri
+@@ -38,7 +38,7 @@ ADDLIB libapi-ms-win-core-file-l2-1-2.a
+ ; FIXME libapi-ms-win-core-file-l2-1-3.a
+ ADDLIB libapi-ms-win-core-firmware-l1-1-0.a
+ ADDLIB libapi-ms-win-core-handle-l1-1-0.a
+-; FIXME libapi-ms-win-core-heap-l1-1-0.a
++ADDLIB libapi-ms-win-core-heap-l1-1-0.a
+ ADDLIB libapi-ms-win-core-heap-l1-2-0.a
+ ADDLIB libapi-ms-win-core-interlocked-l1-1-0.a
+ ADDLIB libapi-ms-win-core-interlocked-l1-2-0.a
+diff --git a/mingw-w64-crt/lib-common/windowsapp.mri b/mingw-w64-crt/lib-common/windowsapp.mri
+index 2496280a5..d1445a4a7 100644
+--- a/mingw-w64-crt/lib-common/windowsapp.mri
++++ b/mingw-w64-crt/lib-common/windowsapp.mri
+@@ -20,6 +20,7 @@ ADDLIB libapi-ms-win-core-file-l1-2-2.a
+ ADDLIB libapi-ms-win-core-file-l2-1-0.a
+ ADDLIB libapi-ms-win-core-file-l2-1-1.a
+ ADDLIB libapi-ms-win-core-handle-l1-1-0.a
++ADDLIB libapi-ms-win-core-heap-l1-1-0.a
+ ADDLIB libapi-ms-win-core-heap-l1-2-0.a
+ ADDLIB libapi-ms-win-core-interlocked-l1-2-0.a
+ ADDLIB libapi-ms-win-core-io-l1-1-0.a
+diff --git a/mingw-w64-crt/lib32/api-ms-win-core-heap-l1-1-0.def b/mingw-w64-crt/lib32/api-ms-win-core-heap-l1-1-0.def
+new file mode 100644
+index 000000000..419896a62
+--- /dev/null
++++ b/mingw-w64-crt/lib32/api-ms-win-core-heap-l1-1-0.def
+@@ -0,0 +1,20 @@
++LIBRARY api-ms-win-core-heap-l1-1-0
++
++EXPORTS
++
++GetProcessHeap at 0
++GetProcessHeaps at 8
++HeapAlloc at 12
++HeapCompact at 8
++HeapCreate at 12
++HeapDestroy at 4
++HeapFree at 12
++HeapLock at 4
++HeapQueryInformation at 20
++HeapReAlloc at 16
++HeapSetInformation at 16
++HeapSize at 12
++HeapSummary at 12
++HeapUnlock at 4
++HeapValidate at 12
++HeapWalk at 8
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/0012-headers-Allow-some-Heap-API-in-Win10-19H1-UWP-builds.patch
=====================================
@@ -0,0 +1,39 @@
+From be84314c974c5c3004ceeb3f510944a4074f137c Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 1 Jun 2023 15:33:40 +0200
+Subject: [PATCH 12/17] headers: Allow some Heap API in Win10 19H1 UWP builds
+
+The documentation doesn't say it's allowed but they are allowed by the
+Windows Application Certification Kit and the 18362 Windows SDK.
+
+It is not allowed in older SDK. It won't compile or won't link.
+The target DLL [1] will likely not have the function, so it should not
+be used when targeting older Windows 10 versions in UWP mode.
+
+We already have api-ms-win-core-heap-l1-1-0 and api-ms-win-core-heap-l1-2-0
+in mincore and windowsapp.
+
+[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-heap-l1-2-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-headers/include/heapapi.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mingw-w64-headers/include/heapapi.h b/mingw-w64-headers/include/heapapi.h
+index b150e1056..fe937f301 100644
+--- a/mingw-w64-headers/include/heapapi.h
++++ b/mingw-w64-headers/include/heapapi.h
+@@ -30,6 +30,9 @@ extern "C" {
+   WINBASEAPI DWORD WINAPI GetProcessHeaps (DWORD NumberOfHeaps, PHANDLE ProcessHeaps);
+   WINBASEAPI WINBOOL WINAPI HeapLock (HANDLE hHeap);
+   WINBASEAPI WINBOOL WINAPI HeapUnlock (HANDLE hHeap);
++#endif
++
++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1
+   WINBASEAPI WINBOOL WINAPI HeapWalk (HANDLE hHeap, LPPROCESS_HEAP_ENTRY lpEntry);
+   WINBASEAPI WINBOOL WINAPI HeapQueryInformation (HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength, PSIZE_T ReturnLength);
+ #endif
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/0013-headers-enable-FindResourceW-in-Win10-19H1-UWP-build.patch
=====================================
@@ -0,0 +1,93 @@
+From 2609975f80bd2c6357b5e6c01210eafee277a00e Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 1 Jun 2023 15:34:34 +0200
+Subject: [PATCH 13/17] headers: enable FindResourceW in Win10 19H1 UWP builds
+
+The documentation doesn't say it's allowed but they are allowed by the
+Windows Application Certification Kit and the 18362 Windows SDK.
+
+It is not allowed in older SDK. It won't compile or won't link.
+The target DLL [1] will likely not have the function, so it should not
+be used when targeting older Windows 10 versions in UWP mode.
+
+We already have api-ms-win-core-libraryloader-l1-2-1 in mincore and windowsapp.
+
+[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-1dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-headers/include/libloaderapi.h |  9 +++++++--
+ mingw-w64-headers/include/winbase.h      | 10 +++++++---
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h
+index 25bacfd29..00aa50f2a 100644
+--- a/mingw-w64-headers/include/libloaderapi.h
++++ b/mingw-w64-headers/include/libloaderapi.h
+@@ -80,13 +80,19 @@ extern "C" {
+ #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2)
+ #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4)
+ 
++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
++  WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
++#ifdef UNICODE
++#define FindResource FindResourceW
++#endif
++#endif
++
+ #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+ #define ENUMRESLANGPROC __MINGW_NAME_AW(ENUMRESLANGPROC)
+ #define ENUMRESNAMEPROC __MINGW_NAME_AW(ENUMRESNAMEPROC)
+ #define ENUMRESTYPEPROC __MINGW_NAME_AW(ENUMRESTYPEPROC)
+ 
+   WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule, LPCWSTR lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG_PTR lParam);
+-  WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
+   WINBASEAPI WINBOOL WINAPI FreeResource (HGLOBAL hResData);
+   WINBASEAPI HGLOBAL WINAPI LoadResource (HMODULE hModule, HRSRC hResInfo);
+   WINUSERAPI int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, int cchBufferMax);
+@@ -98,7 +104,6 @@ extern "C" {
+ 
+ #ifdef UNICODE
+ #define EnumResourceNames EnumResourceNamesW
+-#define FindResource FindResourceW
+ #endif
+ 
+ #define LoadString __MINGW_NAME_AW(LoadString)
+diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h
+index 6e114e28f..050c5e7d4 100644
+--- a/mingw-w64-headers/include/winbase.h
++++ b/mingw-w64-headers/include/winbase.h
+@@ -2015,7 +2015,6 @@ typedef enum FILE_FLUSH_MODE {
+   WINBASEAPI VOID WINAPI FatalAppExitW (UINT uAction, LPCWSTR lpMessageText);
+   WINBASEAPI VOID WINAPI GetStartupInfoA (LPSTARTUPINFOA lpStartupInfo);
+   WINBASEAPI HRSRC WINAPI FindResourceA (HMODULE hModule, LPCSTR lpName, LPCSTR lpType);
+-  WINBASEAPI HRSRC WINAPI FindResourceW (HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
+   WINBASEAPI HRSRC WINAPI FindResourceExA (HMODULE hModule, LPCSTR lpType, LPCSTR lpName, WORD wLanguage);
+   WINBASEAPI WINBOOL WINAPI EnumResourceTypesA (HMODULE hModule, ENUMRESTYPEPROCA lpEnumFunc, LONG_PTR lParam);
+   WINBASEAPI WINBOOL WINAPI EnumResourceTypesW (HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG_PTR lParam);
+@@ -2082,7 +2081,6 @@ typedef enum FILE_FLUSH_MODE {
+ #define FatalAppExit __MINGW_NAME_AW(FatalAppExit)
+ #define GetFirmwareEnvironmentVariable __MINGW_NAME_AW(GetFirmwareEnvironmentVariable)
+ #define SetFirmwareEnvironmentVariable __MINGW_NAME_AW(SetFirmwareEnvironmentVariable)
+-#define FindResource __MINGW_NAME_AW(FindResource)
+ #define EnumResourceTypes __MINGW_NAME_AW(EnumResourceTypes)
+ #define EnumResourceNames __MINGW_NAME_AW(EnumResourceNames)
+ #define EnumResourceLanguages __MINGW_NAME_AW(EnumResourceLanguages)
+@@ -2168,7 +2166,13 @@ typedef enum FILE_FLUSH_MODE {
+ #endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) */
+ 
+ 
+-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1
++  WINBASEAPI HRSRC WINAPI FindResourceW (HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
++
++#define FindResource __MINGW_NAME_AW(FindResource)
++#endif
++
++#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_VB
+   WINBASEAPI WINBOOL WINAPI CreateDirectoryExA (LPCSTR lpTemplateDirectory, LPCSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+   WINBASEAPI WINBOOL WINAPI CreateDirectoryExW (LPCWSTR lpTemplateDirectory, LPCWSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ 
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/0001-headers-check-which-version-of-UWP-Windows-contains-.patch → contrib/src/mingw64/0014-headers-check-which-version-of-UWP-Windows-contains-.patch
=====================================
@@ -1,8 +1,8 @@
-From c060d692db86b56ef8b7da16776be69d31ff97e4 Mon Sep 17 00:00:00 2001
+From 5cd281859723b5fcb3c7a488a3f059aa8f2f74cf Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 1 Jun 2023 13:04:21 +0200
-Subject: [PATCH] headers: check which version of UWP Windows contains Virtual
- functions
+Date: Thu, 1 Jun 2023 15:35:32 +0200
+Subject: [PATCH 14/17] headers: check which version of UWP Windows contains
+ Virtual functions
 
 * VirtualFree is always available in UWP
 * VirtualAlloc is only available since 19H1/18362 SDK
@@ -12,6 +12,8 @@ They are all found in api-ms-win-core-memory-l1-1-0 which is in mincore
 and windowsapp. It's one of the target DLLs [1]
 
 [1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-memory-l1-1-0dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/memoryapi.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)


=====================================
contrib/src/mingw64/0001-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch → contrib/src/mingw64/0015-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch
=====================================
@@ -1,14 +1,16 @@
-From 6dd0fae912ee08193a28670f51a3f1a6292b4c55 Mon Sep 17 00:00:00 2001
+From 5f7be029976e3e5ad00901167ded70b5ca53ebb2 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 5 Jun 2023 16:41:53 +0200
-Subject: [PATCH] headers: enabled LoadLibraryEx flags in Win10 19H1 UWP builds
+Date: Wed, 7 Jun 2023 09:46:58 +0200
+Subject: [PATCH 15/17] headers: enabled LoadLibraryEx flags in Win10 19H1 UWP
+ builds
 
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
 ---
  mingw-w64-headers/include/libloaderapi.h | 48 ++++++++++++------------
  1 file changed, 24 insertions(+), 24 deletions(-)
 
 diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h
-index 6a84aa1c9..51837f122 100644
+index 00aa50f2a..6a5f59ed4 100644
 --- a/mingw-w64-headers/include/libloaderapi.h
 +++ b/mingw-w64-headers/include/libloaderapi.h
 @@ -50,30 +50,6 @@ extern "C" {
@@ -42,7 +44,7 @@ index 6a84aa1c9..51837f122 100644
  #endif /* WINAPI_PARTITION_DESKTOP */
  
  #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1)
-@@ -162,6 +138,30 @@ typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR;
+@@ -166,6 +142,30 @@ typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR;
  #endif
  
  #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1


=====================================
contrib/src/mingw64/0016-headers-Allow-SetDllDirectoryW-A-API-in-Win10-19H1-U.patch
=====================================
@@ -0,0 +1,48 @@
+From b4d090324cbb623584b372c6a978f0d877b7e019 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 7 Jun 2023 09:46:59 +0200
+Subject: [PATCH 16/17] headers: Allow SetDllDirectoryW/A API in Win10 19H1 UWP
+ builds
+
+The documentation doesn't say it's allowed but they are allowed by the
+Windows Application Certification Kit and the 18362 Windows SDK.
+
+It is not allowed in older SDK. It won't compile or won't link.
+The target DLL [1] will likely not have the function, so it should not
+be used when targeting older Windows 10 versions in UWP mode.
+
+We already have api-ms-win-core-kernel32-legacy-l1-1-1
+in windowsapp.
+
+[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-kernel32-legacy-l1-1-1dll
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-headers/include/winbase.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h
+index 050c5e7d4..ad8f069c4 100644
+--- a/mingw-w64-headers/include/winbase.h
++++ b/mingw-w64-headers/include/winbase.h
+@@ -2136,8 +2136,6 @@ typedef enum FILE_FLUSH_MODE {
+ #define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T __MINGW_NAME_UAW_EXT(GET_SYSTEM_WOW64_DIRECTORY_NAME,T)
+ #endif
+ 
+-  WINBASEAPI WINBOOL WINAPI SetDllDirectoryA (LPCSTR lpPathName);
+-  WINBASEAPI WINBOOL WINAPI SetDllDirectoryW (LPCWSTR lpPathName);
+   WINBASEAPI DWORD WINAPI GetDllDirectoryA (DWORD nBufferLength, LPSTR lpBuffer);
+   WINBASEAPI DWORD WINAPI GetDllDirectoryW (DWORD nBufferLength, LPWSTR lpBuffer);
+ 
+@@ -2167,6 +2165,8 @@ typedef enum FILE_FLUSH_MODE {
+ 
+ 
+ #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || NTDDI_VERSION >= NTDDI_WIN10_19H1
++  WINBASEAPI WINBOOL WINAPI SetDllDirectoryA (LPCSTR lpPathName);
++  WINBASEAPI WINBOOL WINAPI SetDllDirectoryW (LPCWSTR lpPathName);
+   WINBASEAPI HRSRC WINAPI FindResourceW (HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
+ 
+ #define FindResource __MINGW_NAME_AW(FindResource)
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/0017-headers-allow-FORMAT_MESSAGE_ALLOCATE_BUFFER-in-UWP.patch
=====================================
@@ -0,0 +1,36 @@
+From 856d9ba2e3095c8775d00933353641de0cee0236 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 14 Jun 2023 09:59:19 +0200
+Subject: [PATCH 17/17] headers: allow FORMAT_MESSAGE_ALLOCATE_BUFFER in UWP
+
+FormatMessageA/W are allowed, so the flag should be allowed too.
+
+Signed-off-by: LIU Hao <lh_mouse at 126.com>
+---
+ mingw-w64-headers/include/winbase.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h
+index ad8f069c4..24eb6b78d 100644
+--- a/mingw-w64-headers/include/winbase.h
++++ b/mingw-w64-headers/include/winbase.h
+@@ -1448,6 +1448,7 @@ typedef enum FILE_FLUSH_MODE {
+ #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
+ #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
+ #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000ff
++#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
+ #endif
+ 
+ #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+@@ -1465,8 +1466,6 @@ typedef enum FILE_FLUSH_MODE {
+ #define FILE_READ_ONLY 8
+ #define FILE_DIR_DISALLOWED 9
+ 
+-#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
+-
+ #define EFS_USE_RECOVERY_KEYS (0x1)
+ 
+ #define CREATE_FOR_IMPORT (1)
+-- 
+2.37.3.windows.1
+


=====================================
contrib/src/mingw64/rules.mak
=====================================
@@ -56,17 +56,23 @@ $(TARBALLS)/mingw-w64-v$(MINGW64_VERSION).tar.bz2:
 mingw64: mingw-w64-v$(MINGW64_VERSION).tar.bz2 .sum-mingw64
 # mingw64: mingw-w64-$(MINGW64_HASH).tar.xz .sum-mingw64
 	$(UNPACK)
-	$(APPLY) $(SRC)/mingw64/0001-headers-only-enable-GetFileInformationByHandle-for-1.patch
-	$(APPLY) $(SRC)/mingw64/0001-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch
-	$(APPLY) $(SRC)/mingw64/0001-headers-check-which-version-of-UWP-Windows-contains-.patch
-	$(APPLY) $(SRC)/mingw64/0004-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch
-	$(APPLY) $(SRC)/mingw64/0001-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch
+	$(APPLY) $(SRC)/mingw64/0001-headers-enable-GetFileInformationByHandle-in-Win10-U.patch
+	$(APPLY) $(SRC)/mingw64/0002-headers-enable-VirtualAlloc-Ex-in-Win10-UWP-builds.patch
+	$(APPLY) $(SRC)/mingw64/0003-headers-enable-GetVolumePathNameW-in-Win10-UWP-build.patch
+	$(APPLY) $(SRC)/mingw64/0004-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch
+	$(APPLY) $(SRC)/mingw64/0005-headers-enable-CreateHardLinkW-in-Win10-19H1-UWP-bui.patch
 	$(APPLY) $(SRC)/mingw64/0006-headers-enable-more-module-API-in-Win10-19H1-UWP-bui.patch
-	$(APPLY) $(SRC)/mingw64/0001-headers-enable-GET_MODULE_HANDLE_EX_xxx-defines-in-U.patch
-	$(APPLY) $(SRC)/mingw64/0008-crt-add-api-ms-core-registry-def-files.patch
-	$(APPLY) $(SRC)/mingw64/0009-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch
+	$(APPLY) $(SRC)/mingw64/0007-crt-add-api-ms-core-registry-def-files.patch
+	$(APPLY) $(SRC)/mingw64/0008-headers-enable-some-Registry-API-calls-in-Win10-19H1.patch
+	$(APPLY) $(SRC)/mingw64/0009-headers-only-enable-GetFileInformationByHandle-for-1.patch
 	$(APPLY) $(SRC)/mingw64/0010-headers-allow-Get-SetHandleInformation-in-Win10-19H1.patch
-	$(APPLY) $(SRC)/mingw64/0001-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch
+	$(APPLY) $(SRC)/mingw64/0011-crt-add-missing-api-ms-win-core-heap-l1-1-0.patch
+	$(APPLY) $(SRC)/mingw64/0012-headers-Allow-some-Heap-API-in-Win10-19H1-UWP-builds.patch
+	$(APPLY) $(SRC)/mingw64/0013-headers-enable-FindResourceW-in-Win10-19H1-UWP-build.patch
+	$(APPLY) $(SRC)/mingw64/0014-headers-check-which-version-of-UWP-Windows-contains-.patch
+	$(APPLY) $(SRC)/mingw64/0015-headers-enabled-LoadLibraryEx-flags-in-Win10-19H1-UW.patch
+	$(APPLY) $(SRC)/mingw64/0016-headers-Allow-SetDllDirectoryW-A-API-in-Win10-19H1-U.patch
+	$(APPLY) $(SRC)/mingw64/0017-headers-allow-FORMAT_MESSAGE_ALLOCATE_BUFFER-in-UWP.patch
 	$(MOVE)
 
 .mingw64: mingw64



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/88d40b7a6eddb4b11393d9e5e02d98281356747c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/88d40b7a6eddb4b11393d9e5e02d98281356747c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list