[libcxx-commits] [PATCH] D94292: [libc++] Sync TEST_HAS_TIMESPEC_GET and _LIBCPP_HAS_TIMESPEC_GET on FreeBSD

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 8 03:45:47 PST 2021


arichardson created this revision.
arichardson added reviewers: libc++, dim.
Herald added subscribers: krytarowski, emaste.
arichardson requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

Commit 5e416ba943b7c737deb8eca62756f7b4fa925845 <https://reviews.llvm.org/rG5e416ba943b7c737deb8eca62756f7b4fa925845> (D71522 <https://reviews.llvm.org/D71522>) updated the
__config header but didn't change test_macros.h.
This fixes libcxx/language.support/has_timespec_get.compile.pass.cpp on
FreeBSD12/13.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94292

Files:
  libcxx/test/support/test_macros.h


Index: libcxx/test/support/test_macros.h
===================================================================
--- libcxx/test/support/test_macros.h
+++ libcxx/test/support/test_macros.h
@@ -167,8 +167,10 @@
 // This is cribbed from __config; but lives here as well because we can't assume libc++
 #if __ISO_C_VISIBLE >= 2011 || TEST_STD_VER >= 11
 #  if defined(__FreeBSD__)
-//  Specifically, FreeBSD does NOT have timespec_get, even though they have all
-//  the rest of C11 - this is PR#38495
+#    if __FreeBSD_version >= 1300064 || \
+       (__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000)
+#      define TEST_HAS_TIMESPEC_GET
+#    endif
 #    define TEST_HAS_ALIGNED_ALLOC
 #    define TEST_HAS_QUICK_EXIT
 #  elif defined(__BIONIC__)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94292.315337.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210108/e307075a/attachment-0001.bin>


More information about the libcxx-commits mailing list