summaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c52
1 files changed, 36 insertions, 16 deletions
diff --git a/lib/version.c b/lib/version.c
index 9ba2e33c1..d39fe0c1d 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,10 +20,7 @@
*
***************************************************************************/
-#include "setup.h"
-
-#include <string.h>
-#include <stdio.h>
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
@@ -33,7 +30,11 @@
#include <curl/mprintf.h>
#ifdef USE_ARES
-#include <ares_version.h>
+# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
+ (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+# define CARES_STATICLIB
+# endif
+# include <ares.h>
#endif
#ifdef USE_LIBIDN
@@ -63,10 +64,11 @@
char *curl_version(void)
{
static char version[200];
- char *ptr=version;
+ char *ptr = version;
size_t len;
size_t left = sizeof(version);
- strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
+
+ strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
len = strlen(ptr);
left -= len;
ptr += len;
@@ -99,6 +101,11 @@ char *curl_version(void)
ptr += len;
}
#endif
+#ifdef USE_WIN32_IDN
+ len = snprintf(ptr, left, " WinIDN");
+ left -= len;
+ ptr += len;
+#endif
#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
#ifdef _LIBICONV_VERSION
len = snprintf(ptr, left, " iconv/%d.%d",
@@ -118,18 +125,22 @@ char *curl_version(void)
#ifdef USE_LIBRTMP
{
char suff[2];
- if (RTMP_LIB_VERSION & 0xff) {
+ if(RTMP_LIB_VERSION & 0xff) {
suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1;
suff[1] = '\0';
- } else {
- suff[0] = '\0';
}
- len = snprintf(ptr, left, " librtmp/%d.%d%s",
- RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+ else
+ suff[0] = '\0';
+
+ snprintf(ptr, left, " librtmp/%d.%d%s",
+ RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff,
+ suff);
/*
If another lib version is added below this one, this code would
also have to do:
+ len = what snprintf() returned
+
left -= len;
ptr += len;
*/
@@ -175,8 +186,9 @@ static const char * const protocols[] = {
#endif
#ifndef CURL_DISABLE_LDAP
"ldap",
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
- (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+ ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+ (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
"ldaps",
#endif
#endif
@@ -232,13 +244,16 @@ static curl_version_info_data version_info = {
#ifdef USE_NTLM
| CURL_VERSION_NTLM
#endif
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+ | CURL_VERSION_NTLM_WB
+#endif
#ifdef USE_WINDOWS_SSPI
| CURL_VERSION_SSPI
#endif
#ifdef HAVE_LIBZ
| CURL_VERSION_LIBZ
#endif
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
| CURL_VERSION_GSSNEGOTIATE
#endif
#ifdef DEBUGBUILD
@@ -260,6 +275,9 @@ static curl_version_info_data version_info = {
#if defined(CURL_DOES_CONVERSIONS)
| CURL_VERSION_CONV
#endif
+#if defined(USE_TLS_SRP)
+ | CURL_VERSION_TLSAUTH_SRP
+#endif
,
NULL, /* ssl_version */
0, /* ssl_version_num, this is kept at zero */
@@ -301,6 +319,8 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION);
if(version_info.libidn)
version_info.features |= CURL_VERSION_IDN;
+#elif defined(USE_WIN32_IDN)
+ version_info.features |= CURL_VERSION_IDN;
#endif
#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)