From: Eric Fiselier Date: Wed, 24 Oct 2018 18:37:42 +0000 (+0000) Subject: Fix use of libc++ specific macro in support/test_macros.h X-Git-Tag: llvmorg-8.0.0-rc1~5895 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5efe8ec4cd09d73c82a15ada6cedcacbf695c6d2;p=platform%2Fupstream%2Fllvm.git Fix use of libc++ specific macro in support/test_macros.h llvm-svn: 345173 --- diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index 65cc93b9ec35..b03ddb932628 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -87,8 +87,9 @@ #endif #endif -// Attempt to deduce GCC version -#if defined(_LIBCPP_VERSION) && __has_include() +// Attempt to deduce the GLIBC version +#if (defined(__has_include) && __has_include()) || \ + defined(__linux__) #include #define TEST_HAS_GLIBC #define TEST_GLIBC_PREREQ(major, minor) __GLIBC_PREREQ(major, minor) @@ -135,7 +136,7 @@ # define TEST_HAS_TIMESPEC_GET # elif defined(__linux__) # if !defined(_LIBCPP_HAS_MUSL_LIBC) -# if _LIBCPP_GLIBC_PREREQ(2, 17) +# if defined(TEST_GLIBC_PREREQ) && TEST_GLIBC_PREREQ(2, 17) # define TEST_HAS_TIMESPEC_GET # define TEST_HAS_C11_FEATURES # endif