diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-03 21:53:51 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-03 21:53:51 +0000 |
commit | b2826a1ddc761fb6abcf8d80793a20387e9dc5f6 (patch) | |
tree | da7f2a05031e7ee3b062a6f4aac11f2b544fca8f /libcxx/src/chrono.cpp | |
parent | 8a41319d8d805dd1a8ba85f28eb111a822c4c45b (diff) | |
download | bcm5719-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/chrono.cpp')
-rw-r--r-- | libcxx/src/chrono.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp index 28cdb9de7a5..8c8e6b5d31a 100644 --- a/libcxx/src/chrono.cpp +++ b/libcxx/src/chrono.cpp @@ -12,7 +12,7 @@ #include "system_error" // __throw_system_error #include <time.h> // clock_gettime, CLOCK_MONOTONIC and CLOCK_REALTIME -#if defined(_WIN32) +#if defined(_LIBCPP_WIN32API) #define WIN32_LEAN_AND_MEAN #define VC_EXTRA_LEAN #include <Windows.h> @@ -22,13 +22,13 @@ #else #if !defined(CLOCK_REALTIME) #include <sys/time.h> // for gettimeofday and timeval -#endif -#endif +#endif // !defined(CLOCK_REALTIME) +#endif // defined(_LIBCPP_WIN32API) #if !defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) #if __APPLE__ #include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t -#elif !defined(_WIN32) && !defined(CLOCK_MONOTONIC) +#elif !defined(_LIBCPP_WIN32API) && !defined(CLOCK_MONOTONIC) #error "Monotonic clock not implemented" #endif #endif @@ -45,7 +45,7 @@ const bool system_clock::is_steady; system_clock::time_point system_clock::now() _NOEXCEPT { -#if defined(_WIN32) +#if defined(_LIBCPP_WIN32API) // FILETIME is in 100ns units using filetime_duration = _VSTD::chrono::duration<__int64, @@ -158,7 +158,7 @@ steady_clock::now() _NOEXCEPT return time_point(duration(fp())); } -#elif defined(_WIN32) +#elif defined(_LIBCPP_WIN32API) steady_clock::time_point steady_clock::now() _NOEXCEPT |