summaryrefslogtreecommitdiffstats
path: root/devel/icu/files/patch-common_umutex.cpp
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2016-09-24 11:06:57 +0000
committertijl <tijl@FreeBSD.org>2016-09-24 11:06:57 +0000
commit066998172e46dd08df392ecd35af710e3dd3da2a (patch)
treee47126c6c357762b62f9e5736c3d27d12948e676 /devel/icu/files/patch-common_umutex.cpp
parent49712f6fc0b0b344ad61319c9fe1eefaae4bc422 (diff)
downloadFreeBSD-ports-066998172e46dd08df392ecd35af710e3dd3da2a.zip
FreeBSD-ports-066998172e46dd08df392ecd35af710e3dd3da2a.tar.gz
- Update devel/icu to 57.1.
- Clean up the Makefile. - Follow some upstream recommendations (--with-data-packaging=archive, --disable-renaming, -DICU_NO_USER_DATA_OVERRIDE). - Patch makefiles to install static libraries with INSTALL_DATA so they aren't stripped. - Patch config/mh-bsd-gcc to sync with config/mh-linux-gcc. - Fix endianness detection in ICU. The code wanted to use BYTE_ORDER defined in machine/endian.h, but this isn't visible because ICU is compiled with _XOPEN_SOURCE. Patch the code to use _BYTE_ORDER instead. - Compile ICU with C++11 compiler to enable move constructors. - Patch ICU to fix a problem with atomics in the case of a C++11 compiler without C++11 header <atomic> (like Clang on FreeBSD 9). - Bump all ports that depend on it due to library version change. - Add USES=compiler:c++0x to some ports that pick up -std=c++0x from ICU pkgconfig files. - Add USES=compiler:c++11-lib to graphics/libcdr01 because it also needs a C++11 runtime library now. Add this to all ports that depend on it so their executables load the right libstdc++.so on FreeBSD 9. PR: 205120 Exp-run by: antoine Approved by: portmgr (antoine)
Diffstat (limited to 'devel/icu/files/patch-common_umutex.cpp')
-rw-r--r--devel/icu/files/patch-common_umutex.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/devel/icu/files/patch-common_umutex.cpp b/devel/icu/files/patch-common_umutex.cpp
new file mode 100644
index 0000000..024225b
--- /dev/null
+++ b/devel/icu/files/patch-common_umutex.cpp
@@ -0,0 +1,25 @@
+--- common/umutex.cpp.orig 2016-03-23 20:50:10 UTC
++++ common/umutex.cpp
+@@ -264,19 +264,19 @@ static pthread_cond_t initCondition = PT
+ U_COMMON_API UBool U_EXPORT2
+ umtx_initImplPreInit(UInitOnce &uio) {
+ pthread_mutex_lock(&initMutex);
+- int32_t state = uio.fState;
++ int32_t state = umtx_loadAcquire(uio.fState);
+ if (state == 0) {
+ umtx_storeRelease(uio.fState, 1);
+ pthread_mutex_unlock(&initMutex);
+ return TRUE; // Caller will next call the init function.
+ } else {
+- while (uio.fState == 1) {
++ while (umtx_loadAcquire(uio.fState) == 1) {
+ // Another thread is currently running the initialization.
+ // Wait until it completes.
+ pthread_cond_wait(&initCondition, &initMutex);
+ }
+ pthread_mutex_unlock(&initMutex);
+- U_ASSERT(uio.fState == 2);
++ U_ASSERT(umtx_loadAcquire(uio.fState) == 2);
+ return FALSE;
+ }
+ }
OpenPOWER on IntegriCloud