diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-04 14:37:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-04 21:37:57 +0200 |
commit | fc7464a882f22e7974135e44867d1a183881edd9 (patch) | |
tree | 67ce371b841b08d7634605b5340acad632299084 /external/gpgmepp | |
parent | 5a28a2ac3f692975306025e9e35e95f4c9ddcd38 (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'external/gpgmepp')
-rw-r--r-- | external/gpgmepp/UnpackedTarball_gpgmepp.mk | 1 | ||||
-rw-r--r-- | external/gpgmepp/clang-cl.patch | 20 |
2 files changed, 21 insertions, 0 deletions
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); + } + + |