Remove automatic IDN support when building i18n.

Remove historic automatic inclusion of IDN support when
building internationalisation support. This doesn't
fit now there is a choice of IDN libraries. Be sure
to include either -DHAVE_IDN or _DHAVE_LIBIDN2 for
IDN support
This commit is contained in:
Simon Kelley committed 2017-05-21 22:12:44 +01:00
1 parent ff19b1a97d
commit 43cdf1c3d0
5 files changed
+27 -23

No files matched your search

+8 -11
View File
@@ -95,10 +95,7 @@ HAVE_DBUS
HAVE_IDN
define this if you want international domain name 2003 support.
NOTE: for backwards compatibility, IDN support is automatically
included when internationalisation support is built, using the
*-i18n makefile targets, even if HAVE_IDN is not explicitly set.
HAVE_LIBIDN2
define this if you want international domain name 2008 support.
@@ -400,14 +397,14 @@ static char *compile_opts =
"no-"
#endif
"i18n "
#if !defined(LOCALEDIR) && !defined(HAVE_IDN)
"no-"
#endif
"IDN "
#if !defined(HAVE_LIBIDN2)
"no-"
#endif
#if defined(HAVE_LIBIDN2)
"IDN2 "
#else
#if !defined(HAVE_IDN)
"no-"
#endif
"IDN "
#endif
#ifndef HAVE_DHCP
"no-"
#endif
+5 -5
View File
@@ -24,9 +24,9 @@
#include <sys/times.h>
#endif
#ifdef HAVE_LIBIDN2
#if defined(HAVE_LIBIDN2)
#include <idn2.h>
#elif defined(LOCALEDIR) || defined(HAVE_IDN)
#elif defined(HAVE_IDN)
#include <idna.h>
#endif
@@ -136,7 +136,7 @@ static int check_name(char *in)
else if (isascii((unsigned char)c) && iscntrl((unsigned char)c))
/* iscntrl only gives expected results for ascii */
return 0;
#if !defined(LOCALEDIR) && !defined(HAVE_IDN) && !defined(HAVE_LIBIDN2)
#if !defined(HAVE_IDN) && !defined(HAVE_LIBIDN2)
else if (!isascii((unsigned char)c))
return 0;
#endif
@@ -186,7 +186,7 @@ int legal_hostname(char *name)
char *canonicalise(char *in, int *nomem)
{
char *ret = NULL;
#if defined(LOCALEDIR) || defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
#if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
int rc;
#endif
@@ -196,7 +196,7 @@ char *canonicalise(char *in, int *nomem)
if (!check_name(in))
return NULL;
#if defined(LOCALEDIR) || defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
#if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
#ifdef HAVE_LIBIDN2
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
if (rc == IDN2_DISALLOWED)