From: Andy Heninger Date: Wed, 31 Oct 2018 21:30:58 +0000 (-0700) Subject: ICU-20185 Remove U_USER_ATOMICS_H, U_USER_MUTEX_H, U_USER_MUTEX_CPP X-Git-Tag: release-64-rc~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=776b9d7f2b15cfb07d04685e6b710fd070258128;p=icu ICU-20185 Remove U_USER_ATOMICS_H, U_USER_MUTEX_H, U_USER_MUTEX_CPP --- diff --git a/icu4c/source/common/umutex.cpp b/icu4c/source/common/umutex.cpp index 9d4fda16d7b..b4671e3b556 100644 --- a/icu4c/source/common/umutex.cpp +++ b/icu4c/source/common/umutex.cpp @@ -36,11 +36,12 @@ static UMutex globalMutex = U_MUTEX_INITIALIZER; */ #if defined(U_USER_MUTEX_CPP) -// Build time user mutex hook: #include "U_USER_MUTEX_CPP" -#include U_MUTEX_XSTR(U_USER_MUTEX_CPP) - +// Support for including an alternate implementation of mutexes has been withdrawn. +// See issue ICU-20185. +#error U_USER_MUTEX_CPP not supported +#endif -#elif U_HAVE_STD_MUTEX +#if U_HAVE_STD_MUTEX // C++11 std::mutex based implementation of ICU mutex wrappers. // diff --git a/icu4c/source/common/umutex.h b/icu4c/source/common/umutex.h index 86a2480873c..94166630ce4 100644 --- a/icu4c/source/common/umutex.h +++ b/icu4c/source/common/umutex.h @@ -35,24 +35,19 @@ U_NAMESPACE_BEGIN struct UInitOnce; U_NAMESPACE_END -// Stringify macros, to allow #include of user supplied atomic & mutex files. -#define U_MUTEX_STR(s) #s -#define U_MUTEX_XSTR(s) U_MUTEX_STR(s) - /**************************************************************************** * * Low Level Atomic Operations. * Compiler dependent. Not operating system dependent. * ****************************************************************************/ -#if defined (U_USER_ATOMICS_H) -#include U_MUTEX_XSTR(U_USER_ATOMICS_H) - -// TODO: There is direct use of std::atomic from number__mapper, numberrangeformatter -// Either add ICU abstraction, or deprecate U_USER_ATOMICS_H. -// See Jira issu ICU-20185. +#if defined(U_USER_ATOMICS_H) +// Support for including an alternate implementation of atomic operations has been withdrawn. +// See issue ICU-20185. +#error U_USER_ATOMICS not supported +#endif -#elif U_HAVE_STD_ATOMICS +#if U_HAVE_STD_ATOMICS // C++11 atomics are available. @@ -336,10 +331,12 @@ U_NAMESPACE_END *************************************************************************************************/ #if defined(U_USER_MUTEX_H) -// #include "U_USER_MUTEX_H" -#include U_MUTEX_XSTR(U_USER_MUTEX_H) +// Support for including an alternate implementation of mutexes has been withdrawn. +// See issue ICU-20185. +#error U_USER_MUTEX_H not supported +#endif -#elif U_HAVE_STD_MUTEX +#if U_HAVE_STD_MUTEX #include #include