1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-04-21 09:17:11 +02:00
parent f8adf1a323
commit bd4d65615b
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
4 changed files with 26 additions and 16 deletions

View File

@ -172,9 +172,9 @@ speedo_spkgs = \
ifeq ($(TARGETOS),w32)
speedo_spkgs += \
zlib bzip2 adns sqlite libiconv
zlib bzip2 adns sqlite
ifeq ($(WITH_GUI),1)
speedo_spkgs += gettext
speedo_spkgs += gettext libiconv
endif
endif

View File

@ -633,11 +633,6 @@ Section "-libgpg-error" SEC_libgpg_error
File include/gpg-error.h
SectionEnd
Section "-libiconv" SEC_libiconv
SetOutPath "$INSTDIR\bin"
File bin/libiconv-2.dll
SectionEnd
Section "-zlib" SEC_zlib
SetOutPath "$INSTDIR\bin"
File bin/zlib1.dll
@ -701,6 +696,11 @@ Section "-gpgme" SEC_gpgme
SectionEnd
!ifdef WITH_GUI
Section "-libiconv" SEC_libiconv
SetOutPath "$INSTDIR\bin"
File bin/libiconv-2.dll
SectionEnd
Section "-gettext" SEC_gettext
SetOutPath "$INSTDIR\bin"
File bin/libintl-8.dll
@ -1054,6 +1054,10 @@ Section "-un.gettext"
Delete "$INSTDIR\bin\libintl-8.dll"
SectionEnd
Section "-un.libiconv"
Delete "$INSTDIR\bin\libiconv-2.dll"
SectionEnd
Section "-un.gpgme"
Delete "$INSTDIR\bin\libgpgme-11.dll"
Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
@ -1097,10 +1101,6 @@ Section "-un.zlib"
Delete "$INSTDIR\bin\zlib1.dll"
SectionEnd
Section "-un.libiconv"
Delete "$INSTDIR\bin\libiconv-2.dll"
SectionEnd
Section "-un.libgpg-error"
Delete "$INSTDIR\bin\libgpg-error-0.dll"
Delete "$INSTDIR\lib\libgpg-error.imp"

View File

@ -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

View File

@ -47,8 +47,9 @@ m4_define([mym4_version], m4_argn(4, mym4_verslist))
m4_define([mym4_revision], m4_argn(7, mym4_verslist))
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
m4_esyscmd([echo ]mym4_version[>VERSION])
AC_INIT([mym4_package],[mym4_version], [http://bugs.gnupg.org])
AC_INIT([mym4_package],[mym4_version], [https://bugs.gnupg.org])
# Note that for Windows we require version 1.22
NEED_GPG_ERROR_VERSION=1.21
NEED_LIBGCRYPT_API=1
@ -639,6 +640,7 @@ case "${host}" in
we use a simplified version of gettext])
have_dosish_system=yes
have_w32_system=yes
require_iconv=no
run_tests=no
use_ldapwrapper=no # Fixme: Do this only for CE.
case "${host}" in