This revision was automatically updated to reflect the committed changes.
Closed by commit rL299625: [libc++] Respect Windows Store app CRT restrictions 
(authored by smeenai).

Changed prior to commit:
  https://reviews.llvm.org/D31737?vs=94308&id=94317#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31737

Files:
  libcxx/trunk/include/__config
  libcxx/trunk/include/cstdlib


Index: libcxx/trunk/include/cstdlib
===================================================================
--- libcxx/trunk/include/cstdlib
+++ libcxx/trunk/include/cstdlib
@@ -130,8 +130,10 @@
 using ::atexit;
 using ::exit;
 using ::_Exit;
+#ifndef _LIBCPP_WINDOWS_STORE_APP
 using ::getenv;
 using ::system;
+#endif
 using ::bsearch;
 using ::qsort;
 using ::abs;
Index: libcxx/trunk/include/__config
===================================================================
--- libcxx/trunk/include/__config
+++ libcxx/trunk/include/__config
@@ -211,6 +211,16 @@
 # if defined(_LIBCPP_MSVCRT)
 #   define _LIBCPP_HAS_QUICK_EXIT
 # endif
+
+// Some CRT APIs are unavailable to store apps
+#if defined(WINAPI_FAMILY)
+#include <winapifamily.h>
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) &&                      
\
+    (!defined(WINAPI_PARTITION_SYSTEM) ||                                      
\
+     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM))
+#define _LIBCPP_WINDOWS_STORE_APP
+#endif
+#endif
 #endif // defined(_WIN32)
 
 #ifdef __sun__


Index: libcxx/trunk/include/cstdlib
===================================================================
--- libcxx/trunk/include/cstdlib
+++ libcxx/trunk/include/cstdlib
@@ -130,8 +130,10 @@
 using ::atexit;
 using ::exit;
 using ::_Exit;
+#ifndef _LIBCPP_WINDOWS_STORE_APP
 using ::getenv;
 using ::system;
+#endif
 using ::bsearch;
 using ::qsort;
 using ::abs;
Index: libcxx/trunk/include/__config
===================================================================
--- libcxx/trunk/include/__config
+++ libcxx/trunk/include/__config
@@ -211,6 +211,16 @@
 # if defined(_LIBCPP_MSVCRT)
 #   define _LIBCPP_HAS_QUICK_EXIT
 # endif
+
+// Some CRT APIs are unavailable to store apps
+#if defined(WINAPI_FAMILY)
+#include <winapifamily.h>
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) &&                      \
+    (!defined(WINAPI_PARTITION_SYSTEM) ||                                      \
+     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM))
+#define _LIBCPP_WINDOWS_STORE_APP
+#endif
+#endif
 #endif // defined(_WIN32)
 
 #ifdef __sun__
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to