external/icu/UnpackedTarball_icu.mk |    4 +++
 external/icu/clang-cl.patch         |   37 ++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

New commits:
commit 4d45df2632dddde3d8e34315c8ee76575587a62a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Oct 1 13:26:38 2019 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Oct 2 08:18:41 2019 +0200

    external/icu: Fix "error: explicit instantiation of 'atomic' not in...
    
    ...a namespace enclosing 'std'" (clang-cl).  (Upstream <https://github.com/
    unicode-org/icu/commit/5a34bfb1516a6719b5f470063c6be2f47446f0b2> "ICU-20209 
Fix
    build failures on Windows with std::atomic not in enclo…" covers more 
things, so
    just include here what is absolutely necessary for our needs.
    
    Change-Id: I10e61b24a5d73b372bfd719d97fc9678029dc205
    Reviewed-on: https://gerrit.libreoffice.org/79953
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 9e5f7974a700..d8a16e0e3777 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -21,6 +21,9 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,icu,0))
 
+# * external/icu/clang-cl.patch is covered by upstream
+#   
<https://github.com/unicode-org/icu/commit/5a34bfb1516a6719b5f470063c6be2f47446f0b2>
 "ICU-20209
+#   Fix build failures on Windows with std::atomic not in enclo…":
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
        external/icu/icu4c-build.patch.1 \
        external/icu/icu4c-aix.patch.1 \
@@ -39,6 +42,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
        external/icu/gcc9.patch \
        external/icu/char8_t.patch \
        external/icu/CVE-2018-18928.patch.2 \
+       external/icu/clang-cl.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/clang-cl.patch b/external/icu/clang-cl.patch
new file mode 100644
index 000000000000..83e7baecf266
--- /dev/null
+++ b/external/icu/clang-cl.patch
@@ -0,0 +1,37 @@
+--- source/common/umutex.h
++++ source/common/umutex.h
+@@ -54,15 +54,15 @@
+ 
+ #include <atomic>
+ 
+-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
+ 
++U_NAMESPACE_BEGIN
++
+ typedef std::atomic<int32_t> u_atomic_int32_t;
+ #define ATOMIC_INT32_T_INITIALIZER(val) ATOMIC_VAR_INIT(val)
+ 
+--- source/i18n/unicode/numberrangeformatter.h
++++ source/i18n/unicode/numberrangeformatter.h
+@@ -186,7 +186,13 @@
+  * (When building DLLs for Windows this is required.)
+  */
+ #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN && 
!defined(U_IN_DOXYGEN)
+-template struct U_I18N_API std::atomic<impl::NumberRangeFormatterImpl*>;
++} // namespace number
++U_NAMESPACE_END
++
++template struct U_I18N_API std::atomic< U_NAMESPACE_QUALIFIER 
number::impl::NumberRangeFormatterImpl*>;
++
++U_NAMESPACE_BEGIN
++namespace number {  // icu::number
+ #endif
+ /** \endcond */
+ 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to