[libcxx-commits] [libcxx] c8644ae - [libcxx] Define LIBCPP_HAS_TIMESPEC_GET for MSVC configurations

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 31 12:13:48 PDT 2021


Author: Martin Storsjö
Date: 2021-05-31T22:13:22+03:00
New Revision: c8644ae1e98c38e44460f50cf9eeba979b32a7e6

URL: https://github.com/llvm/llvm-project/commit/c8644ae1e98c38e44460f50cf9eeba979b32a7e6
DIFF: https://github.com/llvm/llvm-project/commit/c8644ae1e98c38e44460f50cf9eeba979b32a7e6.diff

LOG: [libcxx] Define LIBCPP_HAS_TIMESPEC_GET for MSVC configurations

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

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index dcb134bdaad23..855b850ba1079 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -390,6 +390,9 @@
 #      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

diff  --git a/libcxx/test/libcxx/language.support/has_timespec_get.compile.pass.cpp b/libcxx/test/libcxx/language.support/has_timespec_get.compile.pass.cpp
index a68a7eaf85253..8b86a5ef97195 100644
--- a/libcxx/test/libcxx/language.support/has_timespec_get.compile.pass.cpp
+++ b/libcxx/test/libcxx/language.support/has_timespec_get.compile.pass.cpp
@@ -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.
 

diff  --git a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
index d52581dd81bd2..df827793a1282 100644
--- a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
@@ -8,8 +8,6 @@
 
 // test <ctime>
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 #include <ctime>
 #include <type_traits>
 #include "test_macros.h"

diff  --git a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
index 4a1fda01353bf..8ad3cca4758e0 100644
--- a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
+++ b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 #include <ctime>
 #include <type_traits>
 


        


More information about the libcxx-commits mailing list