diff options
author | Werner Koch <[email protected]> | 2016-04-21 07:17:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-04-21 07:17:11 +0000 |
commit | bd4d65615b3a5360d455b99e77bd113ad90f1539 (patch) | |
tree | 414059246b2e412b5470d446844c85d7ee09b533 /common/utf8conv.c | |
parent | agent: Sanitize permissions of the private key directory. (diff) | |
download | gnupg-bd4d65615b3a5360d455b99e77bd113ad90f1539.tar.gz gnupg-bd4d65615b3a5360d455b99e77bd113ad90f1539.zip |
w32: Replace libiconv DLL by iconv feature of libgpg-error.
* configure.ac: Do nor require libiconv for W32.
* common/utf8conv.c [W32]: Do not incluce iconv.h. Request
libgpg-error iconv macros.
(jnlib_iconv): Use ICONV_CONST macro.
* build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
* build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/utf8conv.c')
-rw-r--r-- | common/utf8conv.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/common/utf8conv.c b/common/utf8conv.c index 8a2cf8a20..83e6eae93 100644 --- a/common/utf8conv.c +++ b/common/utf8conv.c @@ -38,10 +38,17 @@ #include <langinfo.h> #endif #include <errno.h> -#ifndef HAVE_ANDROID_SYSTEM + +#if HAVE_W32_SYSTEM +# /* Tell libgpg-error to provide the iconv macros. */ +# define GPGRT_ENABLE_W32_ICONV_MACROS 1 +#elif HAVE_ANDROID_SYSTEM +# /* No iconv support. */ +#else # include <iconv.h> #endif + #include "util.h" #include "common-defs.h" #include "i18n.h" @@ -244,8 +251,8 @@ set_native_charset (const char *newset) as Latin-1. This makes sense because many Unix system don't have their locale set up properly and thus would get annoying error messages and we have to handle all the "bug" reports. Latin-1 has - always been the character set used for 8 bit characters on Unix - systems. */ + traditionally been the character set used for 8 bit characters on + Unix systems. */ if ( !*newset || !ascii_strcasecmp (newset, "8859-1" ) || !ascii_strcasecmp (newset, "646" ) @@ -700,7 +707,8 @@ jnlib_iconv (jnlib_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { - return iconv ((iconv_t)cd, (char**)inbuf, inbytesleft, outbuf, outbytesleft); + return iconv ((iconv_t)cd, (ICONV_CONST char**)inbuf, inbytesleft, + outbuf, outbytesleft); } /* Wrapper function for iconv_close, required for W32 as we dlopen that |