summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cstdlib
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-04-06 04:47:49 +0000
committerShoaib Meenai <smeenai@fb.com>2017-04-06 04:47:49 +0000
commit5dc5a8e5be002ed478cbdf457ead9ae7ff84152f (patch)
tree1bf66c95c00e0a6814418574409e59fc8c4c6533 /libcxx/include/cstdlib
parentbe65893bc77f60fc6902724f38d54549a51c10e9 (diff)
downloadbcm5719-llvm-5dc5a8e5be002ed478cbdf457ead9ae7ff84152f.tar.gz
bcm5719-llvm-5dc5a8e5be002ed478cbdf457ead9ae7ff84152f.zip
[libc++] Respect Windows Store app CRT restrictions
Some CRT APIs are unavailable for Windows Store apps [1]. Detect when we're targeting the Windows Store and don't try to refer to non-existent CRT functions in that case. (This would otherwise lead to a compile error when using the libc++ headers and compiling for Windows Store.) [1] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps Differential Revision: https://reviews.llvm.org/D31737 llvm-svn: 299625
Diffstat (limited to 'libcxx/include/cstdlib')
-rw-r--r--libcxx/include/cstdlib2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib
index 2ca25ed56ca..78c428403c3 100644
--- a/libcxx/include/cstdlib
+++ b/libcxx/include/cstdlib
@@ -130,8 +130,10 @@ using ::abort;
using ::atexit;
using ::exit;
using ::_Exit;
+#ifndef _LIBCPP_WINDOWS_STORE_APP
using ::getenv;
using ::system;
+#endif
using ::bsearch;
using ::qsort;
using ::abs;
OpenPOWER on IntegriCloud