summaryrefslogtreecommitdiffstats
path: root/mutt_idna.h
diff options
context:
space:
mode:
authorMatej Muzila <mmuzila@redhat.com>2018-04-09 13:46:42 +0200
committerKevin J. McCarthy <kevin@8t8.us>2018-04-15 22:12:05 +0000
commit13a2f6144c51c0451b20056bf92cbd0b2f338f1e (patch)
tree2da00af8e06fffc56043b2f9e7ae9520d1eb57e5 /mutt_idna.h
parenta21fb60e1e1dfc2f4919594b74413d0042283436 (diff)
Add libidn2 support
Diffstat (limited to 'mutt_idna.h')
-rw-r--r--mutt_idna.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/mutt_idna.h b/mutt_idna.h
index 192e08db..62e6e301 100644
--- a/mutt_idna.h
+++ b/mutt_idna.h
@@ -26,13 +26,17 @@
#include <idna.h>
#elif defined(HAVE_IDN_IDNA_H)
#include <idn/idna.h>
+#elif defined(HAVE_IDN2_H)
+#include <idn2.h>
+#elif defined(HAVE_IDN_IDN2_H)
+#include <idn/idn2.h>
#endif
#define MI_MAY_BE_IRREVERSIBLE (1 << 0)
/* Work around incompatibilities in the libidn API */
-#ifdef HAVE_LIBIDN
+#if defined(HAVE_LIBIDN) || defined(HAVE_LIBIDN2)
# if (!defined(HAVE_IDNA_TO_ASCII_8Z) && defined(HAVE_IDNA_TO_ASCII_FROM_UTF8))
# define idna_to_ascii_8z(a,b,c) idna_to_ascii_from_utf8(a,b,(c)&1,((c)&2)?1:0)
# endif
@@ -42,7 +46,7 @@
# if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8))
# define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0)
# endif
-#endif /* HAVE_LIBIDN */
+#endif /* defined(HAVE_LIBIDN) || defined(HAVE_LIBIDN2) */
#ifdef HAVE_ICONV