diff options
Diffstat (limited to 'deps/icu-small/source/common/umutex.h')
-rw-r--r-- | deps/icu-small/source/common/umutex.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/deps/icu-small/source/common/umutex.h b/deps/icu-small/source/common/umutex.h index 8f2f612354..37e4987104 100644 --- a/deps/icu-small/source/common/umutex.h +++ b/deps/icu-small/source/common/umutex.h @@ -56,6 +56,13 @@ U_NAMESPACE_END U_NAMESPACE_BEGIN +// Export an explicit template instantiation of std::atomic<int32_t>. +// When building DLLs for Windows this is required as it is used as a data member of the exported SharedObject class. +// See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples. +#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN +template struct U_COMMON_API std::atomic<int32_t>; +#endif + typedef std::atomic<int32_t> u_atomic_int32_t; #define ATOMIC_INT32_T_INITIALIZER(val) ATOMIC_VAR_INIT(val) @@ -205,7 +212,7 @@ umtx_atomic_dec(u_atomic_int32_t *p); U_NAMESPACE_END -#endif /* Low Level Atomic Ops Platfrom Chain */ +#endif /* Low Level Atomic Ops Platform Chain */ @@ -319,7 +326,7 @@ U_NAMESPACE_END *************************************************************************************************/ #if defined(U_USER_MUTEX_H) -// #inlcude "U_USER_MUTEX_H" +// #include "U_USER_MUTEX_H" #include U_MUTEX_XSTR(U_USER_MUTEX_H) #elif U_PLATFORM_USES_ONLY_WIN32_API @@ -389,7 +396,7 @@ struct UConditionVar { #else /* - * Unknow platform type. + * Unknown platform type. * This is an error condition. ICU requires mutexes. */ @@ -401,7 +408,7 @@ struct UConditionVar { /************************************************************************************** * - * Mutex Implementation function declaratations. + * Mutex Implementation function declarations. * Declarations are platform neutral. * Implementations, in umutex.cpp, are platform specific. * |