summaryrefslogtreecommitdiffstats
path: root/libcxx/src/new.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-03 21:53:51 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-03 21:53:51 +0000
commitb2826a1ddc761fb6abcf8d80793a20387e9dc5f6 (patch)
treeda7f2a05031e7ee3b062a6f4aac11f2b544fca8f /libcxx/src/new.cpp
parent8a41319d8d805dd1a8ba85f28eb111a822c4c45b (diff)
downloadbcm5719-llvm-b2826a1ddc761fb6abcf8d80793a20387e9dc5f6.tar.gz
bcm5719-llvm-b2826a1ddc761fb6abcf8d80793a20387e9dc5f6.zip
clean up use of _WIN32
Replace the use of _WIN32 in libc++. Replace most use with a C runtime check _LIBCPP_MSVCRT or the new _LIBCPP_WIN32 to indicate that we are using the Win32 API. Use a new _LIBCPP_WCHAR_IS_UCS2 to indicate that we are on an environment that has a short wchar_t. llvm-svn: 290910
Diffstat (limited to 'libcxx/src/new.cpp')
-rw-r--r--libcxx/src/new.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp
index 734d93136b5..782aac90fb7 100644
--- a/libcxx/src/new.cpp
+++ b/libcxx/src/new.cpp
@@ -72,7 +72,7 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
if (static_cast<size_t>(alignment) < sizeof(void*))
alignment = std::align_val_t(sizeof(void*));
void* p;
-#if defined(_WIN32)
+#if defined(_LIBCPP_MSVCRT)
while ((p = _aligned_malloc(size, static_cast<size_t>(alignment))) == nullptr)
#else
while (::posix_memalign(&p, static_cast<size_t>(alignment), size) != 0)
OpenPOWER on IntegriCloud