diff --git a/config2.h.in b/config2.h.in index 09774a4b..2a445eb3 100644 --- a/config2.h.in +++ b/config2.h.in @@ -117,7 +117,7 @@ #mesondefine CONFIG_HTML_HIGHLIGHT /* Define if you want: idn support */ -#mesondefine CONFIG_IDN +#mesondefine CONFIG_IDN2 /* Define if you want: interlinking support */ #mesondefine CONFIG_INTERLINK @@ -461,8 +461,8 @@ /* Define if you have the iconv() function. */ #mesondefine HAVE_ICONV -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_IDNA_H +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_IDN2_H /* Define to 1 if you have the header file. */ #mesondefine HAVE_IFADDRS_H diff --git a/meson.build b/meson.build index d0d6652a..eae6ebfa 100644 --- a/meson.build +++ b/meson.build @@ -67,7 +67,7 @@ conf_data.set('CONFIG_BZIP2', get_option('bzlib')) conf_data.set('CONFIG_BROTLI', get_option('brotli')) conf_data.set('CONFIG_ZSTD', get_option('zstd')) -conf_data.set('CONFIG_IDN', get_option('idn')) +conf_data.set('CONFIG_IDN2', get_option('idn')) conf_data.set('CONFIG_LZMA', get_option('lzma')) conf_data.set('CONFIG_GSSAPI', get_option('gssapi')) conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey')) @@ -283,8 +283,8 @@ if compiler.has_header('gpm.h') conf_data.set('HAVE_GPM_H', 1) endif -if compiler.has_header('idna.h') - conf_data.set('HAVE_IDNA_H', 1) +if compiler.has_header('idn2.h') + conf_data.set('HAVE_IDN2_H', 1) endif if compiler.has_header('event.h') @@ -368,8 +368,8 @@ if conf_data.get('CONFIG_LZMA') deps += lzmadeps endif -if conf_data.get('CONFIG_IDN') - idndeps = dependency('libidn', static: st) +if conf_data.get('CONFIG_IDN2') + idndeps = dependency('libidn2', static: st) deps += idndeps endif diff --git a/src/config/cmdline.c b/src/config/cmdline.c index 424bde6a..37a8da53 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -16,8 +16,8 @@ #include #endif -#ifdef HAVE_IDNA_H -#include +#ifdef HAVE_IDN2_H +#include #endif /* We need to have it here. Stupid BSD. */ @@ -168,11 +168,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc) idname = *(*argv - 1); -#ifdef CONFIG_IDN +#ifdef CONFIG_IDN2 if (idname) { - int code = idna_to_ascii_lz(idname, &idname2, 0); + int code = idn2_to_ascii_lz(idname, &idname2, 0); - if (code == IDNA_SUCCESS) { + if (code == IDN2_OK) { idname = idname2; allocated = 1; } diff --git a/src/protocol/test/meson.build b/src/protocol/test/meson.build index b34b5199..bdcf8ee0 100644 --- a/src/protocol/test/meson.build +++ b/src/protocol/test/meson.build @@ -1,4 +1,4 @@ -idna_dep = dependency('libidn') +idna_dep = dependency('libidn2') uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c')