mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
added libidn awareness
This commit is contained in:
parent
9befc682ee
commit
9631fa7407
@ -33,6 +33,10 @@
|
|||||||
#include <ares_version.h>
|
#include <ares_version.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_LIBIDN
|
||||||
|
#include <stringprep.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
static void getssl_version(char *ptr, long *num)
|
static void getssl_version(char *ptr, long *num)
|
||||||
{
|
{
|
||||||
@ -95,6 +99,7 @@ char *curl_version(void)
|
|||||||
{
|
{
|
||||||
static char version[200];
|
static char version[200];
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
int len = sizeof(version);
|
||||||
strcpy(version, LIBCURL_NAME "/" LIBCURL_VERSION );
|
strcpy(version, LIBCURL_NAME "/" LIBCURL_VERSION );
|
||||||
ptr=strchr(version, '\0');
|
ptr=strchr(version, '\0');
|
||||||
|
|
||||||
@ -105,6 +110,7 @@ char *curl_version(void)
|
|||||||
ptr=strchr(version, '\0');
|
ptr=strchr(version, '\0');
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
len -= strlen(version);
|
||||||
|
|
||||||
#ifdef HAVE_KRB4
|
#ifdef HAVE_KRB4
|
||||||
sprintf(ptr, " krb4");
|
sprintf(ptr, " krb4");
|
||||||
@ -127,6 +133,10 @@ char *curl_version(void)
|
|||||||
sprintf(ptr, " c-ares/%s", ares_version(NULL));
|
sprintf(ptr, " c-ares/%s", ares_version(NULL));
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_LIBIDN
|
||||||
|
sprintf(ptr, " libidn/%s", stringprep_check_version(NULL));
|
||||||
|
ptr += strlen(ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
@ -168,7 +178,7 @@ static const char *protocols[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static curl_version_info_data version_info = {
|
static curl_version_info_data version_info = {
|
||||||
CURLVERSION_SECOND,
|
CURLVERSION_NOW,
|
||||||
LIBCURL_VERSION,
|
LIBCURL_VERSION,
|
||||||
LIBCURL_VERSION_NUM,
|
LIBCURL_VERSION_NUM,
|
||||||
OS, /* as found by configure or set by hand at build-time */
|
OS, /* as found by configure or set by hand at build-time */
|
||||||
@ -200,6 +210,9 @@ static curl_version_info_data version_info = {
|
|||||||
#endif
|
#endif
|
||||||
#if defined(ENABLE_64BIT) && (SIZEOF_CURL_OFF_T > 4)
|
#if defined(ENABLE_64BIT) && (SIZEOF_CURL_OFF_T > 4)
|
||||||
| CURL_VERSION_LARGEFILE
|
| CURL_VERSION_LARGEFILE
|
||||||
|
#endif
|
||||||
|
#ifdef USE_LIBIDN
|
||||||
|
| CURL_VERSION_IDN
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
NULL, /* ssl_version */
|
NULL, /* ssl_version */
|
||||||
@ -208,6 +221,7 @@ static curl_version_info_data version_info = {
|
|||||||
protocols,
|
protocols,
|
||||||
NULL, /* c-ares version */
|
NULL, /* c-ares version */
|
||||||
0, /* c-ares version numerical */
|
0, /* c-ares version numerical */
|
||||||
|
NULL, /* libidn version */
|
||||||
};
|
};
|
||||||
|
|
||||||
curl_version_info_data *curl_version_info(CURLversion stamp)
|
curl_version_info_data *curl_version_info(CURLversion stamp)
|
||||||
|
Loading…
Reference in New Issue
Block a user