aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2006-08-04 16:10:48 +0000
committerGisle Vanem <gvanem@broadpark.no>2006-08-04 16:10:48 +0000
commitcca00a63781934492caa8b46f8a9e56035a6e6fe (patch)
tree5d59cecd7348d8822ece5c528c900e403cc32a4c
parent10b7fc7e51413628d242e991396ac41bf4669777 (diff)
Added version info for iconv.
-rw-r--r--lib/version.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/version.c b/lib/version.c
index 6cf5eb5de..46f3ff047 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -41,6 +41,9 @@
#include <stringprep.h>
#endif
+#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
+#include <iconv.h>
+#endif
char *curl_version(void)
{
@@ -74,6 +77,12 @@ char *curl_version(void)
ptr += len;
}
#endif
+#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
+ len = snprintf(ptr, left, " iconv/%d.%d",
+ _libiconv_version >> 8, _libiconv_version & 255);
+ left -= len;
+ ptr += len;
+#endif
return version;
}
@@ -164,6 +173,7 @@ static curl_version_info_data version_info = {
NULL, /* c-ares version */
0, /* c-ares version numerical */
NULL, /* libidn version */
+ 0, /* iconv version */
};
curl_version_info_data *curl_version_info(CURLversion stamp)
@@ -192,6 +202,11 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
if(version_info.libidn)
version_info.features |= CURL_VERSION_IDN;
#endif
+
+#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
+ version_info.iconv_ver_num = _libiconv_version;
+#endif
+
(void)stamp; /* avoid compiler warnings, we don't use this */
return &version_info;