summaryrefslogtreecommitdiffstats
path: root/mutt_idna.h
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2003-11-12 13:49:32 +0000
committerThomas Roessler <roessler@does-not-exist.org>2003-11-12 13:49:32 +0000
commit06857e03863dbd2518c104c704e0012ee5b201f8 (patch)
treed5a5184f8c5d23a4e26d3652ba05f5f478ac17a3 /mutt_idna.h
parentd419e0ff03d2b2d394f8dd2c28845eca9a6014d0 (diff)
Fix IDN API incompatibility problems.
Diffstat (limited to 'mutt_idna.h')
-rw-r--r--mutt_idna.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/mutt_idna.h b/mutt_idna.h
index 270c4209..0e2534a8 100644
--- a/mutt_idna.h
+++ b/mutt_idna.h
@@ -40,4 +40,18 @@ int mutt_env_to_idna (ENVELOPE *, char **, char **);
const char *mutt_addr_for_display (ADDRESS *a);
+/* Work around incompatibilities in the libidn API */
+
+#ifdef HAVE_LIBIDN
+# 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
+# if (!defined(HAVE_IDNA_TO_ASCII_LZ) && defined(HAVE_IDNA_TO_ASCII_FROM_LOCALE))
+# define idna_to_ascii_lz(a,b,c) idna_to_ascii_from_locale(a,b,(c)&1,((c)&2)?1:0)
+# endif
+# 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
+
#endif