[llvm-branch-commits] [libcxx] 077a84f - [libc++] Sync TEST_HAS_TIMESPEC_GET and _LIBCPP_HAS_TIMESPEC_GET on FreeBSD

Alex Richardson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 19 07:09:01 PST 2021


Author: Alex Richardson
Date: 2021-01-19T15:02:57Z
New Revision: 077a84f911403dc92d7918aebfb5611b6e0677d2

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

LOG: [libc++] Sync TEST_HAS_TIMESPEC_GET and _LIBCPP_HAS_TIMESPEC_GET on FreeBSD

Commit 5e416ba943b7c737deb8eca62756f7b4fa925845 (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.

Reviewed By: #libc, dim, ldionne

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

Added: 
    

Modified: 
    libcxx/test/support/test_macros.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 5f8ac2e8b8aa..b71d73980062 100644
--- a/libcxx/test/support/test_macros.h
+++ b/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__)


        


More information about the llvm-branch-commits mailing list