diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-05-24 07:40:00 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-05-24 07:40:00 +0000 |
commit | 24420c21915ff74a8a13c284a1fa66aaff1e847b (patch) | |
tree | 91e9681abf5718a4fd8e6ebaae4726c83a957b12 /lib/version.c | |
parent | 59f904d8de005755f87aa0a4312ab7570a62c6f7 (diff) | |
download | curl-24420c21915ff74a8a13c284a1fa66aaff1e847b.tar.gz |
Simon Josefsson added a idn_free() function in libidn 0.4.5 as a reaction to
Gisle's previous mail. We now use this function, and thus we require libidn
0.4.5 or later. No earler version will do.
Diffstat (limited to 'lib/version.c')
-rw-r--r-- | lib/version.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/version.c b/lib/version.c index 3f981e2b5..7bd4dbe50 100644 --- a/lib/version.c +++ b/lib/version.c @@ -132,8 +132,10 @@ char *curl_version(void) ptr += strlen(ptr); #endif #ifdef USE_LIBIDN - sprintf(ptr, " libidn/%s", stringprep_check_version(NULL)); - ptr += strlen(ptr); + if(stringprep_check_version(LIBIDN_REQUIRED_VERSION)) { + sprintf(ptr, " libidn/%s", stringprep_check_version(NULL)); + ptr += strlen(ptr); + } #endif return version; @@ -209,9 +211,6 @@ static curl_version_info_data version_info = { #if defined(ENABLE_64BIT) && (SIZEOF_CURL_OFF_T > 4) | CURL_VERSION_LARGEFILE #endif -#ifdef USE_LIBIDN - | CURL_VERSION_IDN -#endif , NULL, /* ssl_version */ 0, /* ssl_version_num */ @@ -245,6 +244,13 @@ curl_version_info_data *curl_version_info(CURLversion stamp) version_info.ares_num = aresnum; } #endif +#ifdef USE_LIBIDN + /* This returns a version string if we use the given version or later, + otherwise it returns NULL */ + version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION); + if(version_info.libidn) + version_info.features |= CURL_VERSION_IDN; +#endif (void)stamp; /* avoid compiler warnings, we don't use this */ return &version_info; |