aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2011-04-19 16:45:54 +0200
committerGuenter Knauf <lists@gknw.net>2011-04-19 16:48:32 +0200
commit24e5a40156b0dda012d3ff940a49d9fef4524bdc (patch)
treeb6870ea0744aa4de1f55cbe379cb011bc929e5df /lib
parent2d1b6242f23fb522d87b5ed665d68d605abcfd5a (diff)
Windows native IDN fixes.
Provide prototype for curl_win32_idn_to_ascii(); remove wrong 3rd parameter from curl_win32_idn_to_ascii() call.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/url.c b/lib/url.c
index 019f9a24b..cf576ad8a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -86,14 +86,16 @@
#ifdef HAVE_IDN_FREE_H
#include <idn-free.h>
#else
-void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
- libidn 0.4.5's make install! */
+/* prototype from idn-free.h, not provided by libidn 0.4.5's make install! */
+void idn_free (void *ptr);
#endif
#ifndef HAVE_IDN_FREE
-/* if idn_free() was not found in this version of libidn, use plain free()
- instead */
+/* if idn_free() was not found in this version of libidn use free() instead */
#define idn_free(x) (free)(x)
#endif
+#elif defined(USE_WIN32_IDN)
+/* prototype for curl_win32_idn_to_ascii() */
+int curl_win32_idn_to_ascii(const char *in, char **out);
#endif /* USE_LIBIDN */
#include "urldata.h"
@@ -3452,7 +3454,7 @@ static void fix_hostname(struct SessionHandle *data,
* Check name for non-ASCII and convert hostname to ACE form.
*************************************************************/
char *ace_hostname = NULL;
- int rc = curl_win32_idn_to_ascii(host->name, &ace_hostname, 0);
+ int rc = curl_win32_idn_to_ascii(host->name, &ace_hostname);
if(rc == 0)
infof(data, "Failed to convert %s to ACE;\n",
host->name);