From: Hugo Beauzée-Luyssen <[email protected]>

Also update shlwapi.h since it uses some of the functions/types declared
by winreg.h

Signed-off-by: Martin Storsjö <[email protected]>
---
 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 19ff1f7..7475250 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 c7caec8..84c51af 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.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to