mstcpip.h, wincrypt.h, ws2tcpip.h : WINAPI_PARTITION_APP fixes

These headers can now be used in Windows Store apps

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5948 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/mstcpip.h b/mingw-w64-headers/include/mstcpip.h
index c15c1d7..21c048e 100644
--- a/mingw-w64-headers/include/mstcpip.h
+++ b/mingw-w64-headers/include/mstcpip.h
@@ -7,6 +7,7 @@
 #define _MSTCPIP_
 
 #include <_mingw_unicode.h>
+#include <winapifamily.h>
 
 struct tcp_keepalive {
   u_long onoff;
@@ -95,6 +96,8 @@
   wchar_t                  AllStrings[];
 } SOCKET_SECURITY_SETTINGS_IPSEC;
 
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
 #define RtlIpv6AddressToString __MINGW_NAME_AW(RtlIpv6AddressToString)
 #define RtlIpv6AddressToStringEx __MINGW_NAME_AW(RtlIpv6AddressToStringEx)
 
@@ -124,6 +127,7 @@
 LONG NTAPI RtlIpv6StringToAddressExA(PCSTR AddressString, IN6_ADDR *Address, PULONG ScopeId, PUSHORT Port);
 LONG NTAPI RtlIpv6StringToAddressExW(PCWSTR AddressString, IN6_ADDR *Address, PULONG ScopeId, PUSHORT Port);
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
 #endif /*(_WIN32_WINNT >= 0x0502)*/
 
 #endif /* _MSTCPIP_ */
diff --git a/mingw-w64-headers/include/wincrypt.h b/mingw-w64-headers/include/wincrypt.h
index de80df6..daaaf8b 100644
--- a/mingw-w64-headers/include/wincrypt.h
+++ b/mingw-w64-headers/include/wincrypt.h
@@ -11,6 +11,7 @@
 #include <guiddef.h>
 #include <bcrypt.h>
 #include <ncrypt.h>
+#include <winapifamily.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -4233,6 +4234,7 @@
 
   WINIMPM WINBOOL WINAPI PFXExportCertStore(HCERTSTORE hStore,CRYPT_DATA_BLOB *pPFX,LPCWSTR szPassword,DWORD dwFlags);
 
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 #if (_WIN32_WINNT >= 0x0600)
 #define szOID_LOYALTY_OTHER_LOGOTYPE "1.3.6.1.5.5.7.20.1"
 #define szOID_BACKGROUND_OTHER_LOGOTYPE "1.3.6.1.5.5.7.20.2"
@@ -4308,6 +4310,7 @@
   DWORD cbSignature
 );
 
+
 #define CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC "CryptDllImportPublicKeyInfoEx2"
 
 typedef WINBOOL ( WINAPI *PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC )(
@@ -4927,6 +4930,8 @@
 );
 #endif /*(_WIN32_WINNT >= 0x0601)*/
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/mingw-w64-headers/include/ws2tcpip.h b/mingw-w64-headers/include/ws2tcpip.h
index 8cbb39f..0f05e76 100644
--- a/mingw-w64-headers/include/ws2tcpip.h
+++ b/mingw-w64-headers/include/ws2tcpip.h
@@ -10,6 +10,7 @@
 
 #include <winsock2.h>
 #include <psdk_inc/_ip_mreq1.h>
+#include <winapifamily.h>
 
 struct ip_mreq_source {
   struct in_addr imr_multiaddr;
@@ -68,6 +69,8 @@
 #define IN6ADDR_ANY_INIT { 0 }
 #define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
 
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -175,6 +178,8 @@
 
 #define EAI_NODATA 11004 /* WSANO_DATA */
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+
 typedef struct addrinfo {
   int ai_flags;
   int ai_family;