mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +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:
parent
f8adf1a323
commit
bd4d65615b
@ -172,9 +172,9 @@ speedo_spkgs = \
|
|||||||
|
|
||||||
ifeq ($(TARGETOS),w32)
|
ifeq ($(TARGETOS),w32)
|
||||||
speedo_spkgs += \
|
speedo_spkgs += \
|
||||||
zlib bzip2 adns sqlite libiconv
|
zlib bzip2 adns sqlite
|
||||||
ifeq ($(WITH_GUI),1)
|
ifeq ($(WITH_GUI),1)
|
||||||
speedo_spkgs += gettext
|
speedo_spkgs += gettext libiconv
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -633,11 +633,6 @@ Section "-libgpg-error" SEC_libgpg_error
|
|||||||
File include/gpg-error.h
|
File include/gpg-error.h
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "-libiconv" SEC_libiconv
|
|
||||||
SetOutPath "$INSTDIR\bin"
|
|
||||||
File bin/libiconv-2.dll
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "-zlib" SEC_zlib
|
Section "-zlib" SEC_zlib
|
||||||
SetOutPath "$INSTDIR\bin"
|
SetOutPath "$INSTDIR\bin"
|
||||||
File bin/zlib1.dll
|
File bin/zlib1.dll
|
||||||
@ -701,6 +696,11 @@ Section "-gpgme" SEC_gpgme
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
!ifdef WITH_GUI
|
!ifdef WITH_GUI
|
||||||
|
Section "-libiconv" SEC_libiconv
|
||||||
|
SetOutPath "$INSTDIR\bin"
|
||||||
|
File bin/libiconv-2.dll
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
Section "-gettext" SEC_gettext
|
Section "-gettext" SEC_gettext
|
||||||
SetOutPath "$INSTDIR\bin"
|
SetOutPath "$INSTDIR\bin"
|
||||||
File bin/libintl-8.dll
|
File bin/libintl-8.dll
|
||||||
@ -1054,6 +1054,10 @@ Section "-un.gettext"
|
|||||||
Delete "$INSTDIR\bin\libintl-8.dll"
|
Delete "$INSTDIR\bin\libintl-8.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section "-un.libiconv"
|
||||||
|
Delete "$INSTDIR\bin\libiconv-2.dll"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
Section "-un.gpgme"
|
Section "-un.gpgme"
|
||||||
Delete "$INSTDIR\bin\libgpgme-11.dll"
|
Delete "$INSTDIR\bin\libgpgme-11.dll"
|
||||||
Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
|
Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
|
||||||
@ -1097,10 +1101,6 @@ Section "-un.zlib"
|
|||||||
Delete "$INSTDIR\bin\zlib1.dll"
|
Delete "$INSTDIR\bin\zlib1.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "-un.libiconv"
|
|
||||||
Delete "$INSTDIR\bin\libiconv-2.dll"
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "-un.libgpg-error"
|
Section "-un.libgpg-error"
|
||||||
Delete "$INSTDIR\bin\libgpg-error-0.dll"
|
Delete "$INSTDIR\bin\libgpg-error-0.dll"
|
||||||
Delete "$INSTDIR\lib\libgpg-error.imp"
|
Delete "$INSTDIR\lib\libgpg-error.imp"
|
||||||
|
@ -38,10 +38,17 @@
|
|||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#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>
|
# include <iconv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "common-defs.h"
|
#include "common-defs.h"
|
||||||
#include "i18n.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
|
as Latin-1. This makes sense because many Unix system don't have
|
||||||
their locale set up properly and thus would get annoying error
|
their locale set up properly and thus would get annoying error
|
||||||
messages and we have to handle all the "bug" reports. Latin-1 has
|
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
|
traditionally been the character set used for 8 bit characters on
|
||||||
systems. */
|
Unix systems. */
|
||||||
if ( !*newset
|
if ( !*newset
|
||||||
|| !ascii_strcasecmp (newset, "8859-1" )
|
|| !ascii_strcasecmp (newset, "8859-1" )
|
||||||
|| !ascii_strcasecmp (newset, "646" )
|
|| !ascii_strcasecmp (newset, "646" )
|
||||||
@ -700,7 +707,8 @@ jnlib_iconv (jnlib_iconv_t cd,
|
|||||||
const char **inbuf, size_t *inbytesleft,
|
const char **inbuf, size_t *inbytesleft,
|
||||||
char **outbuf, size_t *outbytesleft)
|
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
|
/* Wrapper function for iconv_close, required for W32 as we dlopen that
|
||||||
|
@ -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], m4_argn(7, mym4_verslist))
|
||||||
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
|
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
|
||||||
m4_esyscmd([echo ]mym4_version[>VERSION])
|
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_GPG_ERROR_VERSION=1.21
|
||||||
|
|
||||||
NEED_LIBGCRYPT_API=1
|
NEED_LIBGCRYPT_API=1
|
||||||
@ -639,6 +640,7 @@ case "${host}" in
|
|||||||
we use a simplified version of gettext])
|
we use a simplified version of gettext])
|
||||||
have_dosish_system=yes
|
have_dosish_system=yes
|
||||||
have_w32_system=yes
|
have_w32_system=yes
|
||||||
|
require_iconv=no
|
||||||
run_tests=no
|
run_tests=no
|
||||||
use_ldapwrapper=no # Fixme: Do this only for CE.
|
use_ldapwrapper=no # Fixme: Do this only for CE.
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user