diff options
| author | Shoaib Meenai <smeenai@fb.com> | 2017-04-06 04:47:49 +0000 |
|---|---|---|
| committer | Shoaib Meenai <smeenai@fb.com> | 2017-04-06 04:47:49 +0000 |
| commit | 5dc5a8e5be002ed478cbdf457ead9ae7ff84152f (patch) | |
| tree | 1bf66c95c00e0a6814418574409e59fc8c4c6533 /libcxx/include/cstdlib | |
| parent | be65893bc77f60fc6902724f38d54549a51c10e9 (diff) | |
| download | bcm5719-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/cstdlib | 2 |
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; |

