external/gpgmepp/UnpackedTarball_gpgmepp.mk |    1 +
 external/gpgmepp/clang-cl.patch             |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit fc7464a882f22e7974135e44867d1a183881edd9
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Aug 4 14:37:42 2020 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Aug 4 21:37:57 2020 +0200

    external/gpgmepp: Avoid overloaded utf8_to_wchar in C code
    
    > w32-util.c(176,1): error: conflicting types for 'utf8_to_wchar'
    > utf8_to_wchar (const char *string)
    > ^
    > workdir/UnpackedTarball/libgpg-error/src\gpg-error.h(1109,10): note: 
previous declaration is here
    > wchar_t *utf8_to_wchar (const char *string, size_t length, size_t 
*retlen);
    >          ^
    
    with clang-cl on Windows, while in a case like this where there is only one
    definition, the mismatching declaration merely gets warned about by MSVC 
with
    "warning C4029: declared formal parameter list different from definition".  
(And
    on non-Windows that w32-util.c apparently doesn't get compiled at all.)
    
    Change-Id: I76cfc3ec086325c527c04dbe0e8341cb9b775c50
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100091
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk 
b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 933d228ac1d3..b2feb6ebc2b7 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -29,5 +29,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
     external/gpgmepp/gcc9.patch \
     external/gpgmepp/ubsan.patch \
     external/gpgmepp/c++20.patch \
+    external/gpgmepp/clang-cl.patch \
 ))
 # vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/clang-cl.patch b/external/gpgmepp/clang-cl.patch
new file mode 100644
index 000000000000..3f63d0bc6bc8
--- /dev/null
+++ b/external/gpgmepp/clang-cl.patch
@@ -0,0 +1,20 @@
+--- src/w32-util.c
++++ src/w32-util.c
+@@ -173,7 +173,7 @@
+    NULL; caller may use GetLastError to get the actual error number.
+    Calling this function with STRING set to NULL is not defined. */
+ static wchar_t *
+-utf8_to_wchar (const char *string)
++utf8_to_wchar_ (const char *string)
+ {
+   int n;
+   wchar_t *result;
+@@ -206,7 +206,7 @@
+   if (!string)
+     return NULL;
+ 
+-  return utf8_to_wchar (string);
++  return utf8_to_wchar_ (string);
+ }
+ 
+ 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to