mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
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:
@@ -115,6 +115,12 @@ version 2.77
|
|||||||
that privileged hosts are not given "guest" addresses by
|
that privileged hosts are not given "guest" addresses by
|
||||||
accident. Thanks to Todd Sanket for the suggestion.
|
accident. Thanks to Todd Sanket for the suggestion.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
version 2.76
|
version 2.76
|
||||||
Include 0.0.0.0/8 in DNS rebind checks. This range
|
Include 0.0.0.0/8 in DNS rebind checks. This range
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -108,8 +108,8 @@ all-i18n : $(BUILDDIR)
|
|||||||
@cd $(BUILDDIR) && $(MAKE) \
|
@cd $(BUILDDIR) && $(MAKE) \
|
||||||
top="$(top)" \
|
top="$(top)" \
|
||||||
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
||||||
build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \
|
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
|
||||||
build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) `$(PKG_CONFIG) --libs libidn`" \
|
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
|
||||||
-f $(top)/Makefile dnsmasq
|
-f $(top)/Makefile dnsmasq
|
||||||
for f in `cd $(PO); echo *.po`; do \
|
for f in `cd $(PO); echo *.po`; do \
|
||||||
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
|
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
|
||||||
|
|||||||
7
debian/rules
vendored
7
debian/rules
vendored
@@ -48,6 +48,10 @@ ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS)))
|
|||||||
DEB_COPTS += -DHAVE_DBUS
|
DEB_COPTS += -DHAVE_DBUS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS)))
|
||||||
|
DEB_COPTS += -DHAVE_IDN
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
|
||||||
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
||||||
DEB_COPTS += -DHAVE_CONNTRACK
|
DEB_COPTS += -DHAVE_CONNTRACK
|
||||||
@@ -84,9 +88,6 @@ endif
|
|||||||
|
|
||||||
ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS)))
|
ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS)))
|
||||||
TARGET = install
|
TARGET = install
|
||||||
ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS)))
|
|
||||||
DEB_COPTS += -DHAVE_IDN
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS)))
|
ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS)))
|
||||||
|
|||||||
17
src/config.h
17
src/config.h
@@ -95,9 +95,6 @@ HAVE_DBUS
|
|||||||
|
|
||||||
HAVE_IDN
|
HAVE_IDN
|
||||||
define this if you want international domain name 2003 support.
|
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
|
HAVE_LIBIDN2
|
||||||
define this if you want international domain name 2008 support.
|
define this if you want international domain name 2008 support.
|
||||||
@@ -400,14 +397,14 @@ static char *compile_opts =
|
|||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
"i18n "
|
"i18n "
|
||||||
#if !defined(LOCALEDIR) && !defined(HAVE_IDN)
|
#if defined(HAVE_LIBIDN2)
|
||||||
"no-"
|
|
||||||
#endif
|
|
||||||
"IDN "
|
|
||||||
#if !defined(HAVE_LIBIDN2)
|
|
||||||
"no-"
|
|
||||||
#endif
|
|
||||||
"IDN2 "
|
"IDN2 "
|
||||||
|
#else
|
||||||
|
#if !defined(HAVE_IDN)
|
||||||
|
"no-"
|
||||||
|
#endif
|
||||||
|
"IDN "
|
||||||
|
#endif
|
||||||
#ifndef HAVE_DHCP
|
#ifndef HAVE_DHCP
|
||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
10
src/util.c
10
src/util.c
@@ -24,9 +24,9 @@
|
|||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBIDN2
|
#if defined(HAVE_LIBIDN2)
|
||||||
#include <idn2.h>
|
#include <idn2.h>
|
||||||
#elif defined(LOCALEDIR) || defined(HAVE_IDN)
|
#elif defined(HAVE_IDN)
|
||||||
#include <idna.h>
|
#include <idna.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ static int check_name(char *in)
|
|||||||
else if (isascii((unsigned char)c) && iscntrl((unsigned char)c))
|
else if (isascii((unsigned char)c) && iscntrl((unsigned char)c))
|
||||||
/* iscntrl only gives expected results for ascii */
|
/* iscntrl only gives expected results for ascii */
|
||||||
return 0;
|
return 0;
|
||||||
#if !defined(LOCALEDIR) && !defined(HAVE_IDN) && !defined(HAVE_LIBIDN2)
|
#if !defined(HAVE_IDN) && !defined(HAVE_LIBIDN2)
|
||||||
else if (!isascii((unsigned char)c))
|
else if (!isascii((unsigned char)c))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -186,7 +186,7 @@ int legal_hostname(char *name)
|
|||||||
char *canonicalise(char *in, int *nomem)
|
char *canonicalise(char *in, int *nomem)
|
||||||
{
|
{
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
#if defined(LOCALEDIR) || defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
|
#if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
|
||||||
int rc;
|
int rc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ char *canonicalise(char *in, int *nomem)
|
|||||||
if (!check_name(in))
|
if (!check_name(in))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#if defined(LOCALEDIR) || defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
|
#if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
|
||||||
#ifdef HAVE_LIBIDN2
|
#ifdef HAVE_LIBIDN2
|
||||||
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
|
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
|
||||||
if (rc == IDN2_DISALLOWED)
|
if (rc == IDN2_DISALLOWED)
|
||||||
|
|||||||
Reference in New Issue
Block a user