diff options
author | Eric Fiselier <eric@efcs.ca> | 2018-10-24 18:37:42 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2018-10-24 18:37:42 +0000 |
commit | 5efe8ec4cd09d73c82a15ada6cedcacbf695c6d2 (patch) | |
tree | e6aec99179f88b19f25bca1f9bae8b18c375ffd8 | |
parent | aa2948776a89320a94cb819149735288b99ded93 (diff) | |
download | bcm5719-llvm-5efe8ec4cd09d73c82a15ada6cedcacbf695c6d2.tar.gz bcm5719-llvm-5efe8ec4cd09d73c82a15ada6cedcacbf695c6d2.zip |
Fix use of libc++ specific macro in support/test_macros.h
llvm-svn: 345173
-rw-r--r-- | libcxx/test/support/test_macros.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index 65cc93b9ec3..b03ddb93262 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(<features.h>) +// Attempt to deduce the GLIBC version +#if (defined(__has_include) && __has_include(<features.h>)) || \ + defined(__linux__) #include <features.h> #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 |