diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2006-08-15 17:02:24 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2006-08-15 17:02:24 +0000 |
commit | 31def9e2175d4d4ba3810f3781ca5110254ad6f9 (patch) | |
tree | fc421d70665c86f2510c8abd604fedea8a862529 | |
parent | ee3514ccdc9325a30fea3f0a5ac0a75ab6dc85d0 (diff) |
Use '_LIBICONV_VERSION' instead of variable '_libiconv_version'
to support older iconv versions.
-rw-r--r-- | lib/version.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/version.c b/lib/version.c index 46f3ff047..722f93b22 100644 --- a/lib/version.c +++ b/lib/version.c @@ -78,8 +78,13 @@ char *curl_version(void) } #endif #if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS) +#ifdef _LIBICONV_VERSION len = snprintf(ptr, left, " iconv/%d.%d", - _libiconv_version >> 8, _libiconv_version & 255); + _LIBICONV_VERSION >> 8, _LIBICONV_VERSION & 255); +#else + /* version unknown */ + len = snprintf(ptr, left, " iconv"); +#endif /* _LIBICONV_VERSION */ left -= len; ptr += len; #endif @@ -204,7 +209,12 @@ curl_version_info_data *curl_version_info(CURLversion stamp) #endif #if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS) - version_info.iconv_ver_num = _libiconv_version; +#ifdef _LIBICONV_VERSION + version_info.iconv_ver_num = _LIBICONV_VERSION; +#else + /* version unknown */ + version_info.iconv_ver_num = -1; +#endif /* _LIBICONV_VERSION */ #endif (void)stamp; /* avoid compiler warnings, we don't use this */ |