aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-07 07:41:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-07 07:41:44 +0000
commitc274e516540270b0f353a8eefe4da5a64a6445a4 (patch)
treee5870130d20ed728b4b4b5379d245a373bddfe2b
parent1239e4830476327e4db3f37a00282a68d5f4f862 (diff)
use tld_strerror() only if previously detected, since otherwise we can't
work with libidn < 0.5.6
-rw-r--r--lib/url.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 51b171129..7d7865316 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2095,11 +2095,22 @@ static bool tld_check_name (struct SessionHandle *data,
rc = tld_check_lz(uc_name, &err_pos, NULL);
if (rc == TLD_INVALID)
infof(data, "WARNING: %s; pos %u = `%c'/0x%02X\n",
- tld_strerror(rc), err_pos, uc_name[err_pos],
+#ifdef HAVE_TLD_STRERROR
+ tld_strerror(rc),
+#else
+ "<no msg>",
+#endif
+ err_pos, uc_name[err_pos],
uc_name[err_pos] & 255);
else if (rc != TLD_SUCCESS)
infof(data, "WARNING: TLD check for %s failed; %s\n",
- uc_name, tld_strerror(rc));
+ uc_name,
+#ifdef HAVE_TLD_STRERROR
+ tld_strerror(rc)
+#else
+ "<no msg>"
+#endif
+ );
if (uc_name)
idn_free(uc_name);
return (rc == TLD_SUCCESS);