[libcxx] Define LIBCPP_HAS_TIMESPEC_GET for MSVC configurations
authorMartin Storsjö <martin@martin.st>
Mon, 31 May 2021 09:32:51 +0000 (09:32 +0000)
committerMartin Storsjö <martin@martin.st>
Mon, 31 May 2021 19:13:22 +0000 (22:13 +0300)
This define was out of sync with the corresponding define in tests, it
was added inconsistently in 171c77b7dad4a050aca23ff7ca1b75f87560fefb.

Modern MSVC environments do have these typedefs and functions.

Differential Revision: https://reviews.llvm.org/D103398

libcxx/include/__config
libcxx/test/libcxx/language.support/has_timespec_get.compile.pass.cpp
libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
libcxx/test/std/utilities/time/date.time/ctime.pass.cpp

index dcb134b..855b850 100644 (file)
 #      define _LIBCPP_HAS_QUICK_EXIT
 #      define _LIBCPP_HAS_TIMESPEC_GET
 #    endif
+#  elif defined(_LIBCPP_MSVCRT)
+     // Using Microsoft's C Runtime library, not MinGW
+#    define _LIBCPP_HAS_TIMESPEC_GET
 #  elif defined(__APPLE__)
      // timespec_get and aligned_alloc were introduced in macOS 10.15 and
      // aligned releases
index a68a7ea..8b86a5e 100644 (file)
@@ -8,8 +8,6 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // Make sure TEST_HAS_TIMESPEC_GET (defined by the test suite) and
 // _LIBCPP_HAS_TIMESPEC_GET (defined by libc++) stay in sync.
 
index d52581d..df82779 100644 (file)
@@ -8,8 +8,6 @@
 
 // test <ctime>
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 #include <ctime>
 #include <type_traits>
 #include "test_macros.h"
index 4a1fda0..8ad3cca 100644 (file)
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 #include <ctime>
 #include <type_traits>