From a26088f95106a04965d78dac2542b0ceab31531d Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 24 Jul 2013 21:06:24 +0000 Subject: [PATCH] ICU-10271 when #include doesn't work, don't use it (autoconf mode only) X-SVN-Rev: 33978 --- icu4c/source/common/putilimp.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/putilimp.h b/icu4c/source/common/putilimp.h index fc6788e4877..1ea9fc92150 100644 --- a/icu4c/source/common/putilimp.h +++ b/icu4c/source/common/putilimp.h @@ -197,7 +197,6 @@ typedef size_t uintptr_t; /** @} */ - /** * \def U_HAVE_STD_ATOMICS * Defines whether the standard C++11 is available. @@ -213,8 +212,16 @@ typedef size_t uintptr_t; #elif __clang__ && __clang_major__==3 && __clang_minor__<=1 /* Clang 3.1. Atomics not fully implemented. */ # define U_HAVE_STD_ATOMICS 0 -#else -# define U_HAVE_STD_ATOMICS 1 +#else +# if defined(U_HAVE_ATOMIC) /* autoconf detected or manually set */ +# if U_HAVE_ATOMIC +# define U_HAVE_STD_ATOMICS 1 /* #include works */ +# else +# define U_HAVE_STD_ATOMICS 0 /* #include doesn't work. */ +# endif +# else +# define U_HAVE_STD_ATOMICS 0 /* Default: do not use */ +# endif #endif #else -- 2.40.0