RELEASE-NOTES: synced with 4cb2521595
[platform/upstream/curl.git] / lib / version.c
index 38da9f1..2c0e9b8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 #include "urldata.h"
-#include "sslgen.h"
+#include "vtls/vtls.h"
+#include "http2.h"
 
 #define _MPRINTF_REPLACE /* use the internal *printf() functions */
 #include <curl/mprintf.h>
@@ -67,11 +68,6 @@ char *curl_version(void)
   char *ptr = version;
   size_t len;
   size_t left = sizeof(version);
-#ifdef USE_WINDOWS_SSPI
-  int sspi_major = 0;
-  int sspi_minor = 0;
-  int sspi_build = 0;
-#endif;
 
   strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
   len = strlen(ptr);
@@ -88,17 +84,6 @@ char *curl_version(void)
     }
   }
 
-#ifdef USE_WINDOWS_SSPI
-  if(CURLE_OK == Curl_sspi_version(&sspi_major, &sspi_minor, &sspi_build,
-                                   NULL))
-    len = snprintf(ptr, left, " sspi/%d.%d.%d", sspi_major, sspi_minor,
-                 sspi_build);
-  else
-    len = snprintf(ptr, left, " sspi/unknown");
-
-  left -= len;
-  ptr += len;
-#endif
 #ifdef HAVE_LIBZ
   len = snprintf(ptr, left, " zlib/%s", zlibVersion());
   left -= len;
@@ -118,7 +103,7 @@ char *curl_version(void)
   }
 #endif
 #ifdef USE_WIN32_IDN
-  len = snprintf(ptr, left, " IDN-Windows-native");
+  len = snprintf(ptr, left, " WinIDN");
   left -= len;
   ptr += len;
 #endif
@@ -138,6 +123,11 @@ char *curl_version(void)
   left -= len;
   ptr += len;
 #endif
+#ifdef USE_NGHTTP2
+  len = Curl_http2_ver(ptr, left);
+  left -= len;
+  ptr += len;
+#endif
 #ifdef USE_LIBRTMP
   {
     char suff[2];
@@ -148,12 +138,15 @@ char *curl_version(void)
     else
       suff[0] = '\0';
 
-    len = snprintf(ptr, left, " librtmp/%d.%d%s",
-      RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+    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;
 */
@@ -248,9 +241,6 @@ static curl_version_info_data version_info = {
 #ifdef ENABLE_IPV6
   | CURL_VERSION_IPV6
 #endif
-#ifdef HAVE_KRB4
-  | CURL_VERSION_KERBEROS4
-#endif
 #ifdef USE_SSL
   | CURL_VERSION_SSL
 #endif
@@ -260,6 +250,9 @@ static curl_version_info_data version_info = {
 #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
@@ -288,6 +281,9 @@ static curl_version_info_data version_info = {
 #if defined(USE_TLS_SRP)
   | CURL_VERSION_TLSAUTH_SRP
 #endif
+#if defined(USE_NGHTTP2)
+  | CURL_VERSION_HTTP2
+#endif
   ,
   NULL, /* ssl_version */
   0,    /* ssl_version_num, this is kept at zero */