]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove idnkit-1 support from dig
authorOndřej Surý <ondrej@sury.org>
Wed, 14 Mar 2018 11:03:53 +0000 (12:03 +0100)
committerOndřej Surý <ondrej@sury.org>
Sat, 17 Mar 2018 13:41:59 +0000 (13:41 +0000)
bin/dig/Makefile.in
bin/dig/dighost.c
bin/dig/host.c
bin/dig/include/dig/dig.h
config.h.in
configure
configure.in

index ceb272d0a2f31ba6bdc1edfd1121f4a00c1f9fff..0ddd9b0f7a6d070ef3ab56c00aa4289bda306752 100644 (file)
@@ -41,10 +41,10 @@ DEPLIBS =   ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
                ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
 
 LIBS =         ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
-               ${ISCLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
+               ${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
 
 NOSYMLIBS =    ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
-               ${ISCNOSYMLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
+               ${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
 
 SUBDIRS =
 
index c5d027bd4f6f10961b278598eddd1b6f9f5237ca..57712ec347faec70748335ba4d19a80ab04bde2e 100644 (file)
 #endif
 
 #ifdef WITH_IDN_SUPPORT
-#ifdef WITH_IDNKIT
-#include <idn/result.h>
-#include <idn/log.h>
-#include <idn/resconf.h>
-#include <idn/api.h>
-#endif
 
 #ifdef WITH_LIBIDN2
 #include <idn2.h>
@@ -157,9 +151,6 @@ static isc_result_t output_filter(isc_buffer_t *buffer,
                isc_boolean_t absolute);
 #define MAXDLEN 256
 
-#ifdef WITH_IDNKIT
-int idnoptions = 0;
-#endif
 #endif /* WITH_IDN_OUT_SUPPORT */
 
 isc_socket_t *keep = NULL;
@@ -4304,54 +4295,6 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
 #endif
 
 #ifdef WITH_IDN_SUPPORT
-#ifdef WITH_IDNKIT
-static void
-idnkit_check_result(idn_result_t result, const char *msg) {
-       if (result != idn_success) {
-               fatal("%s: %s", msg, idn_result_tostring(result));
-       }
-}
-
-static void
-idn_initialize(void) {
-       idn_result_t result;
-
-       /* Create configuration context. */
-       result = idn_nameinit(1);
-       idnkit_check_result(result, "idnkit api initialization failed");
-       return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-idn_locale_to_ace(const char *from, char *to, size_t tolen) {
-       char utf8_textname[MXNAME];
-       idn_result_t result;
-
-       result = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, from,
-                               utf8_textname, sizeof(utf8_textname));
-       idnkit_check_result(result, "idnkit idn_encodename to utf8 failed");
-
-       result = idn_encodename(idnoptions | IDN_LOCALMAP | IDN_NAMEPREP |
-                               IDN_IDNCONV | IDN_LENCHECK,
-                               utf8_textname, to, tolen);
-       idnkit_check_result(result, "idnkit idn_encodename to idn failed");
-       return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-idn_ace_to_locale(const char *from, char *to, size_t tolen) {
-       idn_result_t result;
-
-       result = idn_decodename(IDN_DECODE_APP, from, to, tolen);
-       if (result != idn_success) {
-               debug("idnkit idn_decodename failed: %s",
-                     idn_result_tostring(result));
-               return (ISC_R_FAILURE);
-       }
-       return (ISC_R_SUCCESS);
-}
-#endif /* WITH_IDNKIT */
-
 #ifdef WITH_LIBIDN2
 static void
 idn_initialize(void) {
index cbb548d2fccba60027db78e7e7ef56d69384b4ae..de835b67e585731763cee73d420ed2bb9f1fdbc3 100644 (file)
 #include <locale.h>
 #endif
 
-#ifdef WITH_IDNKIT
-#include <idn/result.h>
-#include <idn/log.h>
-#include <idn/resconf.h>
-#include <idn/api.h>
-#endif
-
 #include <isc/app.h>
 #include <isc/commandline.h>
 #include <isc/netaddr.h>
@@ -721,9 +714,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                            lookup->rdtype != dns_rdatatype_axfr)
                                lookup->rdtype = rdtype;
                        lookup->rdtypeset = ISC_TRUE;
-#ifdef WITH_IDNKIT
-                       idnoptions = 0;
-#endif
                        if (rdtype == dns_rdatatype_axfr) {
                                /* -l -t any -v */
                                list_type = dns_rdatatype_any;
@@ -736,13 +726,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        } else if (rdtype == dns_rdatatype_any) {
                                if (!lookup->tcp_mode_set)
                                        lookup->tcp_mode = ISC_TRUE;
-#ifdef WITH_IDNKIT
-                       } else if (rdtype == dns_rdatatype_a ||
-                                  rdtype == dns_rdatatype_aaaa ||
-                                  rdtype == dns_rdatatype_mx) {
-                               idnoptions = IDN_ASCCHECK;
-                               list_type = rdtype;
-#endif
                        } else
                                list_type = rdtype;
                        list_addresses = ISC_FALSE;
@@ -771,9 +754,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        if (!lookup->rdtypeset ||
                            lookup->rdtype != dns_rdatatype_axfr)
                                lookup->rdtype = dns_rdatatype_any;
-#ifdef WITH_IDNKIT
-                       idnoptions = 0;
-#endif
                        list_type = dns_rdatatype_any;
                        list_addresses = ISC_FALSE;
                        lookup->rdtypeset = ISC_TRUE;
@@ -885,9 +865,6 @@ main(int argc, char **argv) {
        ISC_LIST_INIT(search_list);
 
        fatalexit = 1;
-#ifdef WITH_IDNKIT
-       idnoptions = IDN_ASCCHECK;
-#endif
 
        /* setup dighost callbacks */
        dighost_printmessage = printmessage;
index b08e99f94b95b194246dba1f420d437206023787..6cf1683f00f9279e4b4071c329ecd7723830cb24 100644 (file)
@@ -269,9 +269,6 @@ extern char *progname;
 extern int tries;
 extern int fatalexit;
 extern isc_boolean_t verbose;
-#ifdef WITH_IDNKIT
-extern int idnoptions;
-#endif
 
 /*
  * Routines in dighost.c.
index 52277996f95cf4989c2a8ffa9e8369809bce3b62..c7a088e3ce5add009211c1c2d9ba53096268399e 100644 (file)
@@ -596,9 +596,6 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to enable very verbose query trace logging. */
 #undef WANT_QUERYTRACE
 
-/* define if idnkit support is to be included. */
-#undef WITH_IDNKIT
-
 /* define if IDN output support is to be included. */
 #undef WITH_IDN_OUT_SUPPORT
 
index 5a64ba72bf7c030cb15233be6ab0078f254975cf..669e7af11b5fe2622272ac133e05f71ec6f6aa23 100755 (executable)
--- a/configure
+++ b/configure
@@ -683,7 +683,6 @@ ATFBIN
 ATFBUILD
 LIBIDN2_LIBS
 LIBIDN2_CFLAGS
-IDNKIT_LIBS
 XSLT_DBLATEX_FASTBOOK
 XSLT_DBLATEX_STYLE
 XSLT_DOCBOOK_MAKETOC_XHTML
@@ -1042,10 +1041,6 @@ enable_dnstap
 with_protobuf_c
 with_libfstrm
 with_docbook_xsl
-with_idnkit
-with_libiconv
-with_iconv
-with_idnlib
 with_libidn2
 with_atf
 with_tuning
@@ -1777,10 +1772,6 @@ Optional Packages:
   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
   --with-docbook-xsl=PATH specify path for Docbook-XSL stylesheets
-  --with-idnkit=PATH      enable IDN support using idnkit [yes|no|path]
-  --with-libiconv=IPREFIX GNU libiconv are in IPREFIX [default PREFIX]
-  --with-iconv=LIBSPEC    specify iconv library [default -liconv]
-  --with-idnlib=ARG       specify libidnkit
   --with-libidn2=PATH     enable IDN support using GNU libidn2 [yes|no|path]
   --with-atf              support Automated Test Framework
   --with-tuning=ARG       Specify server tuning (large or default)
 
 
 
-#
-# IDN support using idnkit
-#
-
-# Check whether --with-idnkit was given.
-if test "${with_idnkit+set}" = set; then :
-  withval=$with_idnkit; use_idnkit="$withval"
-else
-  use_idnkit="no"
-fi
-
-case "$use_idnkit" in
-yes)
-       if test X$prefix = XNONE ; then
-               idnkit_path=/usr/local
-       else
-               idnkit_path=$prefix
-       fi
-       ;;
-no)
-       ;;
-*)
-       idnkit_path="$use_idnkit"
-       ;;
-esac
-
-iconvinc=
-iconvlib=
-
-# Check whether --with-libiconv was given.
-if test "${with_libiconv+set}" = set; then :
-  withval=$with_libiconv; use_libiconv="$withval"
-else
-  use_libiconv="no"
-fi
-
-case "$use_libiconv" in
-yes)
-       if test X$prefix = XNONE ; then
-               iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
-       else
-               iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
-       fi
-       ;;
-no)
-       iconvlib=
-       ;;
-*)
-       iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
-       ;;
-esac
-
-
-# Check whether --with-iconv was given.
-if test "${with_iconv+set}" = set; then :
-  withval=$with_iconv; iconvlib="$withval"
-fi
-
-case "$iconvlib" in
-no)
-       iconvlib=
-       ;;
-yes)
-       iconvlib=-liconv
-       ;;
-esac
-
-
-# Check whether --with-idnlib was given.
-if test "${with_idnlib+set}" = set; then :
-  withval=$with_idnlib; idnlib="$withval"
-else
-  idnlib="no"
-fi
-
-if test "yes" = "$idnlib"; then
-       as_fn_error $? "You must specify ARG for --with-idnlib." "$LINENO" 5
-fi
-
-IDNKIT_LIBS=
-if test "no" != "$use_idnkit"; then
-
-$as_echo "#define WITH_IDNKIT 1" >>confdefs.h
-
-       STD_CINCLUDES="$STD_CINCLUDES -I$idnkit_path/include"
-       if test "no" != "$idnlib"; then
-               IDNKIT_LIBS="$idnlib $iconvlib"
-       else
-               IDNKIT_LIBS="-L$idnkit_path/lib -lidnkit $iconvlib"
-       fi
-fi
-
-
 #
 # IDN support using libidn2
 #
@@ -22721,6 +22619,9 @@ ac_res=$ac_cv_search_idn2_to_ascii_8z
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+$as_echo "#define WITH_IDN_SUPPORT 1" >>confdefs.h
+
+
 $as_echo "#define WITH_LIBIDN2 1" >>confdefs.h
 
 else
 
 
 
-#
-# IDN support in general
-#
-
-# check if idnkit and libidn2 are not used at the same time
-if test "$use_idnkit" != no && test "$use_libidn2" != no; then
-    as_fn_error $? "idnkit and libidn2 cannot be used at the same time." "$LINENO" 5
-fi
-# the IDN support is on
-if test "$use_idnkit" != no || test "$use_libidn2" != no; then
-
-$as_echo "#define WITH_IDN_SUPPORT 1" >>confdefs.h
-
-       if test "$use_libidn2" = no || test "$use_libidn2_out" != no; then
-
-$as_echo "#define WITH_IDN_OUT_SUPPORT 1" >>confdefs.h
-
-       fi
-fi
-
 #
 # Check whether to build Automated Test Framework unit tests
 #
index a4fa5562431f87ef29c4db6aea4e2072fb7536ce..6cc42b59e863ece84e41e4e1abbe6b8257450d45 100644 (file)
@@ -4697,82 +4697,6 @@ dblatex_xsl_trees="/usr/local/share/xml/docbook/stylesheet/dblatex /usr/pkg/shar
 NOM_PATH_FILE(XSLT_DBLATEX_STYLE, xsl/docbook.xsl, $dblatex_xsl_trees)
 NOM_PATH_FILE(XSLT_DBLATEX_FASTBOOK, xsl/latex_book_fast.xsl, $dblatex_xsl_trees)
 
-#
-# IDN support using idnkit
-#
-AC_ARG_WITH(idnkit,
-           AS_HELP_STRING([--with-idnkit[=PATH]],
-                          [enable IDN support using idnkit [yes|no|path]]),
-       use_idnkit="$withval", use_idnkit="no")
-case "$use_idnkit" in
-yes)
-       if test X$prefix = XNONE ; then
-               idnkit_path=/usr/local
-       else
-               idnkit_path=$prefix
-       fi
-       ;;
-no)
-       ;;
-*)
-       idnkit_path="$use_idnkit"
-       ;;
-esac
-
-iconvinc=
-iconvlib=
-AC_ARG_WITH(libiconv,
-           AS_HELP_STRING([--with-libiconv[=IPREFIX]],
-                          [GNU libiconv are in IPREFIX [default PREFIX]]),
-       use_libiconv="$withval", use_libiconv="no")
-case "$use_libiconv" in
-yes)
-       if test X$prefix = XNONE ; then
-               iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
-       else
-               iconvlib="-L$prefix/lib -R$prefix/lib -liconv"
-       fi
-       ;;
-no)
-       iconvlib=
-       ;;
-*)
-       iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
-       ;;
-esac
-
-AC_ARG_WITH(iconv,
-           AS_HELP_STRING([--with-iconv[=LIBSPEC]],
-                          [specify iconv library [default -liconv]]),
-       iconvlib="$withval")
-case "$iconvlib" in
-no)
-       iconvlib=
-       ;;
-yes)
-       iconvlib=-liconv
-       ;;
-esac
-
-AC_ARG_WITH(idnlib,
-           AS_HELP_STRING([--with-idnlib=ARG], [specify libidnkit]),
-           idnlib="$withval", idnlib="no")
-if test "yes" = "$idnlib"; then
-       AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
-fi
-
-IDNKIT_LIBS=
-if test "no" != "$use_idnkit"; then
-       AC_DEFINE(WITH_IDNKIT, 1, [define if idnkit support is to be included.])
-       STD_CINCLUDES="$STD_CINCLUDES -I$idnkit_path/include"
-       if test "no" != "$idnlib"; then
-               IDNKIT_LIBS="$idnlib $iconvlib"
-       else
-               IDNKIT_LIBS="-L$idnkit_path/lib -lidnkit $iconvlib"
-       fi
-fi
-AC_SUBST(IDNKIT_LIBS)
-
 #
 # IDN support using libidn2
 #
@@ -4794,7 +4718,8 @@ AS_CASE([$use_libidn2],
 
 AS_IF([test "$use_libidn2" != "no"],
       [AC_SEARCH_LIBS([idn2_to_ascii_8z], [idn2],
-                     [AC_DEFINE(WITH_LIBIDN2, 1, [define if libidn2 support is to be included.])],
+                     [AC_DEFINE(WITH_IDN_SUPPORT, 1, [define if IDN input support is to be included.])
+                      AC_DEFINE(WITH_LIBIDN2, 1, [define if libidn2 support is to be included.])],
                      [AC_MSG_ERROR([libidn2 requested, but not found])])
        AC_MSG_CHECKING(whether libidn2 supports idn2_to_unicode_8zlz)
        AC_TRY_LINK([#include <idn2.h>],
@@ -4806,22 +4731,6 @@ AS_IF([test "$use_libidn2" != "no"],
 AC_SUBST([LIBIDN2_CFLAGS])
 AC_SUBST([LIBIDN2_LIBS])
 
-#
-# IDN support in general
-#
-
-# check if idnkit and libidn2 are not used at the same time
-if test "$use_idnkit" != no && test "$use_libidn2" != no; then
-    AC_MSG_ERROR([idnkit and libidn2 cannot be used at the same time.])
-fi
-# the IDN support is on
-if test "$use_idnkit" != no || test "$use_libidn2" != no; then
-       AC_DEFINE(WITH_IDN_SUPPORT, 1, [define if IDN input support is to be included.])
-       if test "$use_libidn2" = no || test "$use_libidn2_out" != no; then
-               AC_DEFINE(WITH_IDN_OUT_SUPPORT, 1, [define if IDN output support is to be included.])
-       fi
-fi
-
 #
 # Check whether to build Automated Test Framework unit tests
 #