Commit f93ce2c9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

vlc-winrt: Drop our patchset

Ugly patches have been implemented properly, and other patches have been
merged by Martin.
parent 001efc03
......@@ -2,7 +2,7 @@ FROM registry.videolan.org:5000/videolan-base-stretch:20180419104422
MAINTAINER Hugo Beauzée-Luyssen <hugo@beauzee.fr>
ENV IMAGE_DATE=201804101743
ENV IMAGE_DATE=201807111132
ENV TARGET_TUPLE=i686-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
......@@ -18,8 +18,6 @@ RUN apt-get update -qq && apt-get install -qqy \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
COPY patches /build/patches
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
......@@ -53,7 +51,6 @@ RUN set -x && \
cd binutils-$BINUTILS_VERSION && mkdir build && cd build && \
../configure --prefix=$TOOLCHAIN_PREFIX --target=$TARGET_TUPLE \
--disable-werror --disable-multilib && make -j4 && make install-strip && \
cd /build/mingw-w64 && git am /build/patches/*.patch && \
cd /build/mingw-w64/mingw-w64-headers && mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE && make install && \
......
From af4f65af97ad8503a9b2fd178ae36b37987285be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 21 Apr 2016 16:07:59 +0200
Subject: [PATCH 1/3] UGLY HACK: Don't use Rtl* function on win64 when building
for winrt
---
mingw-w64-crt/crt/crt_handler.c | 2 +-
mingw-w64-crt/crt/crtdll.c | 2 +-
mingw-w64-crt/crt/crtexe.c | 2 +-
mingw-w64-crt/crt/gs_support.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crt_handler.c b/mingw-w64-crt/crt/crt_handler.c
index 6571e69e..7a86641e 100644
--- a/mingw-w64-crt/crt/crt_handler.c
+++ b/mingw-w64-crt/crt/crt_handler.c
@@ -40,7 +40,7 @@ PBYTE _GetPEImageBase (void);
int __mingw_init_ehandler (void);
extern void _fpreset (void);
-#if defined(__x86_64__) && !defined(_MSC_VER)
+#if defined(__x86_64___NOPE_NOPE_NOPE) && !defined(_MSC_VER)
EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
#define MAX_PDATA_ENTRIES 32
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 6b5418bd..5a39af54 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -171,7 +171,7 @@ DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
if (dwReason == DLL_PROCESS_ATTACH)
{
__security_init_cookie ();
-#ifdef __x86_64__
+#ifdef __x86_64___NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
}
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index baa8d81e..37f1bab5 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -286,7 +286,7 @@ __tmainCRTStartup (void)
_pei386_runtime_relocator ();
__mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
-#ifdef __x86_64__
+#ifdef __x86_64___NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
_set_invalid_parameter_handler (__mingw_invalidParameterHandler);
diff --git a/mingw-w64-crt/crt/gs_support.c b/mingw-w64-crt/crt/gs_support.c
index 0c6ac68c..779d6faf 100644
--- a/mingw-w64-crt/crt/gs_support.c
+++ b/mingw-w64-crt/crt/gs_support.c
@@ -104,7 +104,7 @@ __declspec(noreturn) void __cdecl
__report_gsfailure (ULONG_PTR StackCookie)
{
volatile UINT_PTR cookie[2] __MINGW_ATTRIB_UNUSED;
-#if defined(_WIN64) && !defined(__aarch64__)
+#if defined(_WIN64_NOPE_NOPE_NOPE) && !defined(__aarch64__)
ULONG64 controlPC, imgBase, establisherFrame;
PRUNTIME_FUNCTION fctEntry;
PVOID hndData;
--
2.11.0
From 42df9603d48c3378480c0ac16180a96a39986fdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Fri, 29 Apr 2016 11:07:45 +0200
Subject: [PATCH 2/3] crt: Add missing snprintf aliases
---
mingw-w64-crt/lib32/msvcr120_app.def.in | 1 +
mingw-w64-crt/lib64/msvcr120_app.def.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/mingw-w64-crt/lib32/msvcr120_app.def.in b/mingw-w64-crt/lib32/msvcr120_app.def.in
index b29eaf9a..0c5aaff9 100644
--- a/mingw-w64-crt/lib32/msvcr120_app.def.in
+++ b/mingw-w64-crt/lib32/msvcr120_app.def.in
@@ -1042,6 +1042,7 @@ _vscwprintf_p
_vscwprintf_p_l
_vsnprintf
vsnprintf == _vsnprintf
+snprintf == _snprintf
_vsnprintf_c
_vsnprintf_c_l
_vsnprintf_l
diff --git a/mingw-w64-crt/lib64/msvcr120_app.def.in b/mingw-w64-crt/lib64/msvcr120_app.def.in
index 53b2f7b0..b829b841 100644
--- a/mingw-w64-crt/lib64/msvcr120_app.def.in
+++ b/mingw-w64-crt/lib64/msvcr120_app.def.in
@@ -984,6 +984,7 @@ _vscwprintf_p
_vscwprintf_p_l
_vsnprintf
vsnprintf == _vsnprintf
+snprintf == _snprintf
_vsnprintf_c
_vsnprintf_c_l
_vsnprintf_l
--
2.11.0
From a0e4ba37087e54898638fe56ea9445d2d3802643 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 27 Jun 2017 17:30:24 +0200
Subject: [PATCH 3/3] winbase.h: WaitForMultipleObjects is available on UWP
---
mingw-w64-headers/include/winbase.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h
index 77da6a38..db391292 100644
--- a/mingw-w64-headers/include/winbase.h
+++ b/mingw-w64-headers/include/winbase.h
@@ -1265,6 +1265,10 @@ extern "C" {
#define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
#endif
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
+ WINBASEAPI DWORD WINAPI WaitForMultipleObjects (DWORD nCount, CONST HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds);
+#endif
+
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
typedef enum _DEP_SYSTEM_POLICY_TYPE {
DEPPolicyAlwaysOff = 0,
@@ -1286,7 +1290,6 @@ extern "C" {
#define SET_TAPE_DRIVE_INFORMATION 1
WINBASEAPI WINBOOL WINAPI PulseEvent (HANDLE hEvent);
- WINBASEAPI DWORD WINAPI WaitForMultipleObjects (DWORD nCount, CONST HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds);
WINBASEAPI ATOM WINAPI GlobalDeleteAtom (ATOM nAtom);
WINBASEAPI WINBOOL WINAPI InitAtomTable (DWORD nSize);
WINBASEAPI ATOM WINAPI DeleteAtom (ATOM nAtom);
--
2.11.0
From 405e3d27a769432b37b28908a98757042ac55832 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 21 Dec 2017 15:10:39 +0100
Subject: [PATCH] sysinfoapi.h: Allow some functions for UWP
---
mingw-w64-headers/include/sysinfoapi.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/mingw-w64-headers/include/sysinfoapi.h b/mingw-w64-headers/include/sysinfoapi.h
index 7d43ff5b..cf5fedda 100644
--- a/mingw-w64-headers/include/sysinfoapi.h
+++ b/mingw-w64-headers/include/sysinfoapi.h
@@ -43,8 +43,7 @@ extern "C" {
#endif
#endif
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
- WINBASEAPI DWORD WINAPI GetVersion (VOID);
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
typedef struct _MEMORYSTATUSEX {
DWORD dwLength;
@@ -58,6 +57,14 @@ extern "C" {
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX,*LPMEMORYSTATUSEX;
+ WINBASEAPI VOID WINAPI GetSystemInfo (LPSYSTEM_INFO lpSystemInfo);
+ WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx (LPMEMORYSTATUSEX lpBuffer);
+ WINBASEAPI DWORD WINAPI GetTickCount (VOID);
+ WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME lpSystemTimeAsFileTime);
+
+#endif
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
typedef enum _COMPUTER_NAME_FORMAT {
ComputerNameNetBIOS,
ComputerNameDnsHostname,
@@ -70,10 +77,9 @@ extern "C" {
ComputerNameMax
} COMPUTER_NAME_FORMAT;
- WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx (LPMEMORYSTATUSEX lpBuffer);
+ WINBASEAPI DWORD WINAPI GetVersion (VOID);
+
WINBASEAPI WINBOOL WINAPI SetLocalTime (CONST SYSTEMTIME *lpSystemTime);
- WINBASEAPI VOID WINAPI GetSystemInfo (LPSYSTEM_INFO lpSystemInfo);
- WINBASEAPI DWORD WINAPI GetTickCount (VOID);
WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment (PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, PBOOL lpTimeAdjustmentDisabled);
WINBASEAPI UINT WINAPI GetSystemDirectoryA (LPSTR lpBuffer, UINT uSize);
WINBASEAPI UINT WINAPI GetSystemDirectoryW (LPWSTR lpBuffer, UINT uSize);
@@ -89,7 +95,6 @@ extern "C" {
WINBASEAPI WINBOOL WINAPI GetVersionExW (LPOSVERSIONINFOW lpVersionInformation);
WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnedLength);
NTSYSAPI ULONGLONG NTAPI VerSetConditionMask (ULONGLONG ConditionMask, ULONG TypeMask, UCHAR Condition);
- WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME lpSystemTimeAsFileTime);
WINBASEAPI UINT WINAPI EnumSystemFirmwareTables (DWORD FirmwareTableProviderSignature, PVOID pFirmwareTableEnumBuffer, DWORD BufferSize);
WINBASEAPI UINT WINAPI GetSystemFirmwareTable (DWORD FirmwareTableProviderSignature, DWORD FirmwareTableID, PVOID pFirmwareTableBuffer, DWORD BufferSize);
#if _WIN32_WINNT >= 0x0600
--
2.11.0
From 7383e7450a28419c467e5f91a8875e827435a498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 10 Apr 2018 15:09:37 +0200
Subject: [PATCH 5/5] winreg.h: Add missing WINAPI_PARTITION_DESKTOP guard
Also update shlwapi.h since it uses some of the functions/types declared
by winreg.h
---
mingw-w64-headers/include/shlwapi.h | 4 ++++
mingw-w64-headers/include/winreg.h | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/mingw-w64-headers/include/shlwapi.h b/mingw-w64-headers/include/shlwapi.h
index 19ff1f7c..7475250a 100644
--- a/mingw-w64-headers/include/shlwapi.h
+++ b/mingw-w64-headers/include/shlwapi.h
@@ -7,9 +7,12 @@
#define _INC_SHLWAPI
#include <_mingw_unicode.h>
+#include <winapifamily.h>
#ifndef NOSHLWAPI
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#include <objbase.h>
#include <shtypes.h>
@@ -941,3 +944,4 @@ LWSTDAPI_(IStream *) SHCreateMemStream(const BYTE *pInit, _In_ UINT cbInit);
#include <poppack.h>
#endif
#endif
+#endif
diff --git a/mingw-w64-headers/include/winreg.h b/mingw-w64-headers/include/winreg.h
index c7caec8b..84c51afd 100644
--- a/mingw-w64-headers/include/winreg.h
+++ b/mingw-w64-headers/include/winreg.h
@@ -7,6 +7,7 @@
#define _WINREG_
#include <_mingw_unicode.h>
+#include <winapifamily.h>
#ifdef __cplusplus
extern "C" {
@@ -110,6 +111,8 @@ extern "C" {
#define WIN31_CLASS NULL
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#define RegConnectRegistry __MINGW_NAME_AW(RegConnectRegistry)
#define RegConnectRegistryEx __MINGW_NAME_AW(RegConnectRegistryEx)
#define RegCreateKey __MINGW_NAME_AW(RegCreateKey)
@@ -408,6 +411,8 @@ WINADVAPI DWORD WINAPI InitiateShutdownW(
#endif /* (_WIN32_WINNT >= 0x0600) */
+#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
+
#ifdef __cplusplus
}
#endif
--
2.11.0
......@@ -2,7 +2,7 @@ FROM registry.videolan.org:5000/videolan-base-stretch:20180419104422
MAINTAINER Hugo Beauzée-Luyssen <hugo@beauzee.fr>
ENV IMAGE_DATE=201804101743
ENV IMAGE_DATE=201807111132
ENV TARGET_TUPLE=x86_64-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-${TARGET_TUPLE}
......@@ -18,8 +18,6 @@ RUN apt-get update -qq && apt-get install -qqy \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
COPY patches /build/patches
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
......@@ -53,7 +51,6 @@ RUN set -x && \
cd binutils-$BINUTILS_VERSION && mkdir build && cd build && \
../configure --prefix=$TOOLCHAIN_PREFIX --target=$TARGET_TUPLE \
--disable-werror --disable-multilib && make -j4 && make install-strip && \
cd /build/mingw-w64 && git am /build/patches/*.patch && \
cd /build/mingw-w64/mingw-w64-headers && mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE && make install && \
......
From af4f65af97ad8503a9b2fd178ae36b37987285be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 21 Apr 2016 16:07:59 +0200
Subject: [PATCH 1/3] UGLY HACK: Don't use Rtl* function on win64 when building
for winrt
---
mingw-w64-crt/crt/crt_handler.c | 2 +-
mingw-w64-crt/crt/crtdll.c | 2 +-
mingw-w64-crt/crt/crtexe.c | 2 +-
mingw-w64-crt/crt/gs_support.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crt_handler.c b/mingw-w64-crt/crt/crt_handler.c
index 6571e69e..7a86641e 100644
--- a/mingw-w64-crt/crt/crt_handler.c
+++ b/mingw-w64-crt/crt/crt_handler.c
@@ -40,7 +40,7 @@ PBYTE _GetPEImageBase (void);
int __mingw_init_ehandler (void);
extern void _fpreset (void);
-#if defined(__x86_64__) && !defined(_MSC_VER)
+#if defined(__x86_64___NOPE_NOPE_NOPE) && !defined(_MSC_VER)
EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
#define MAX_PDATA_ENTRIES 32
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 6b5418bd..5a39af54 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -171,7 +171,7 @@ DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
if (dwReason == DLL_PROCESS_ATTACH)
{
__security_init_cookie ();
-#ifdef __x86_64__
+#ifdef __x86_64___NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
}
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index baa8d81e..37f1bab5 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -286,7 +286,7 @@ __tmainCRTStartup (void)
_pei386_runtime_relocator ();
__mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
-#ifdef __x86_64__
+#ifdef __x86_64___NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
_set_invalid_parameter_handler (__mingw_invalidParameterHandler);
diff --git a/mingw-w64-crt/crt/gs_support.c b/mingw-w64-crt/crt/gs_support.c
index 0c6ac68c..779d6faf 100644
--- a/mingw-w64-crt/crt/gs_support.c
+++ b/mingw-w64-crt/crt/gs_support.c
@@ -104,7 +104,7 @@ __declspec(noreturn) void __cdecl
__report_gsfailure (ULONG_PTR StackCookie)
{
volatile UINT_PTR cookie[2] __MINGW_ATTRIB_UNUSED;
-#if defined(_WIN64) && !defined(__aarch64__)
+#if defined(_WIN64_NOPE_NOPE_NOPE) && !defined(__aarch64__)
ULONG64 controlPC, imgBase, establisherFrame;
PRUNTIME_FUNCTION fctEntry;
PVOID hndData;
--
2.11.0
From 42df9603d48c3378480c0ac16180a96a39986fdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Fri, 29 Apr 2016 11:07:45 +0200
Subject: [PATCH 2/3] crt: Add missing snprintf aliases
---
mingw-w64-crt/lib32/msvcr120_app.def.in | 1 +
mingw-w64-crt/lib64/msvcr120_app.def.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/mingw-w64-crt/lib32/msvcr120_app.def.in b/mingw-w64-crt/lib32/msvcr120_app.def.in
index b29eaf9a..0c5aaff9 100644
--- a/mingw-w64-crt/lib32/msvcr120_app.def.in
+++ b/mingw-w64-crt/lib32/msvcr120_app.def.in
@@ -1042,6 +1042,7 @@ _vscwprintf_p
_vscwprintf_p_l
_vsnprintf
vsnprintf == _vsnprintf
+snprintf == _snprintf
_vsnprintf_c
_vsnprintf_c_l
_vsnprintf_l
diff --git a/mingw-w64-crt/lib64/msvcr120_app.def.in b/mingw-w64-crt/lib64/msvcr120_app.def.in
index 53b2f7b0..b829b841 100644
--- a/mingw-w64-crt/lib64/msvcr120_app.def.in
+++ b/mingw-w64-crt/lib64/msvcr120_app.def.in
@@ -984,6 +984,7 @@ _vscwprintf_p
_vscwprintf_p_l
_vsnprintf
vsnprintf == _vsnprintf
+snprintf == _snprintf
_vsnprintf_c
_vsnprintf_c_l
_vsnprintf_l
--
2.11.0
From a0e4ba37087e54898638fe56ea9445d2d3802643 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 27 Jun 2017 17:30:24 +0200
Subject: [PATCH 3/3] winbase.h: WaitForMultipleObjects is available on UWP
---
mingw-w64-headers/include/winbase.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h
index 77da6a38..db391292 100644
--- a/mingw-w64-headers/include/winbase.h
+++ b/mingw-w64-headers/include/winbase.h
@@ -1265,6 +1265,10 @@ extern "C" {
#define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
#endif
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
+ WINBASEAPI DWORD WINAPI WaitForMultipleObjects (DWORD nCount, CONST HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds);
+#endif
+
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
typedef enum _DEP_SYSTEM_POLICY_TYPE {
DEPPolicyAlwaysOff = 0,
@@ -1286,7 +1290,6 @@ extern "C" {
#define SET_TAPE_DRIVE_INFORMATION 1
WINBASEAPI WINBOOL WINAPI PulseEvent (HANDLE hEvent);
- WINBASEAPI DWORD WINAPI WaitForMultipleObjects (DWORD nCount, CONST HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds);
WINBASEAPI ATOM WINAPI GlobalDeleteAtom (ATOM nAtom);
WINBASEAPI WINBOOL WINAPI InitAtomTable (DWORD nSize);
WINBASEAPI ATOM WINAPI DeleteAtom (ATOM nAtom);
--
2.11.0
From 405e3d27a769432b37b28908a98757042ac55832 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 21 Dec 2017 15:10:39 +0100
Subject: [PATCH] sysinfoapi.h: Allow some functions for UWP
---
mingw-w64-headers/include/sysinfoapi.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/mingw-w64-headers/include/sysinfoapi.h b/mingw-w64-headers/include/sysinfoapi.h
index 7d43ff5b..cf5fedda 100644
--- a/mingw-w64-headers/include/sysinfoapi.h
+++ b/mingw-w64-headers/include/sysinfoapi.h
@@ -43,8 +43,7 @@ extern "C" {
#endif
#endif
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
- WINBASEAPI DWORD WINAPI GetVersion (VOID);
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10
typedef struct _MEMORYSTATUSEX {
DWORD dwLength;
@@ -58,6 +57,14 @@ extern "C" {
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX,*LPMEMORYSTATUSEX;
+ WINBASEAPI VOID WINAPI GetSystemInfo (LPSYSTEM_INFO lpSystemInfo);
+ WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx (LPMEMORYSTATUSEX lpBuffer);
+ WINBASEAPI DWORD WINAPI GetTickCount (VOID);
+ WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME lpSystemTimeAsFileTime);
+
+#endif
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
typedef enum _COMPUTER_NAME_FORMAT {
ComputerNameNetBIOS,
ComputerNameDnsHostname,
@@ -70,10 +77,9 @@ extern "C" {
ComputerNameMax
} COMPUTER_NAME_FORMAT;
- WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx (LPMEMORYSTATUSEX lpBuffer);
+ WINBASEAPI DWORD WINAPI GetVersion (VOID);
+
WINBASEAPI WINBOOL WINAPI SetLocalTime (CONST SYSTEMTIME *lpSystemTime);
- WINBASEAPI VOID WINAPI GetSystemInfo (LPSYSTEM_INFO lpSystemInfo);
- WINBASEAPI DWORD WINAPI GetTickCount (VOID);
WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment (PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, PBOOL lpTimeAdjustmentDisabled);
WINBASEAPI UINT WINAPI GetSystemDirectoryA (LPSTR lpBuffer, UINT uSize);
WINBASEAPI UINT WINAPI GetSystemDirectoryW (LPWSTR lpBuffer, UINT uSize);
@@ -89,7 +95,6 @@ extern "C" {
WINBASEAPI WINBOOL WINAPI GetVersionExW (LPOSVERSIONINFOW lpVersionInformation);
WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnedLength);
NTSYSAPI ULONGLONG NTAPI VerSetConditionMask (ULONGLONG ConditionMask, ULONG TypeMask, UCHAR Condition);
- WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME lpSystemTimeAsFileTime);
WINBASEAPI UINT WINAPI EnumSystemFirmwareTables (DWORD FirmwareTableProviderSignature, PVOID pFirmwareTableEnumBuffer, DWORD BufferSize);
WINBASEAPI UINT WINAPI GetSystemFirmwareTable (DWORD FirmwareTableProviderSignature, DWORD FirmwareTableID, PVOID pFirmwareTableBuffer, DWORD BufferSize);
#if _WIN32_WINNT >= 0x0600
--
2.11.0
From 7383e7450a28419c467e5f91a8875e827435a498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 10 Apr 2018 15:09:37 +0200
Subject: [PATCH 5/5] winreg.h: Add missing WINAPI_PARTITION_DESKTOP guard
Also update shlwapi.h since it uses some of the functions/types declared
by winreg.h
---
mingw-w64-headers/include/shlwapi.h | 4 ++++
mingw-w64-headers/include/winreg.h | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/mingw-w64-headers/include/shlwapi.h b/mingw-w64-headers/include/shlwapi.h
index 19ff1f7c..7475250a 100644
--- a/mingw-w64-headers/include/shlwapi.h
+++ b/mingw-w64-headers/include/shlwapi.h
@@ -7,9 +7,12 @@
#define _INC_SHLWAPI
#include <_mingw_unicode.h>
+#include <winapifamily.h>
#ifndef NOSHLWAPI
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#include <objbase.h>
#include <shtypes.h>
@@ -941,3 +944,4 @@ LWSTDAPI_(IStream *) SHCreateMemStream(const BYTE *pInit, _In_ UINT cbInit);
#include <poppack.h>
#endif
#endif
+#endif
diff --git a/mingw-w64-headers/include/winreg.h b/mingw-w64-headers/include/winreg.h
index c7caec8b..84c51afd 100644
--- a/mingw-w64-headers/include/winreg.h
+++ b/mingw-w64-headers/include/winreg.h
@@ -7,6 +7,7 @@
#define _WINREG_
#include <_mingw_unicode.h>
+#include <winapifamily.h>
#ifdef __cplusplus
extern "C" {
@@ -110,6 +111,8 @@ extern "C" {
#define WIN31_CLASS NULL
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#define RegConnectRegistry __MINGW_NAME_AW(RegConnectRegistry)
#define RegConnectRegistryEx __MINGW_NAME_AW(RegConnectRegistryEx)
#define RegCreateKey __MINGW_NAME_AW(RegCreateKey)
@@ -408,6 +411,8 @@ WINADVAPI DWORD WINAPI InitiateShutdownW(
#endif /* (_WIN32_WINNT >= 0x0600) */
+#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
+
#ifdef __cplusplus
}
#endif
--
2.11.0
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