aboutsummaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-03-13 09:58:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-03-13 09:58:15 +0000
commit74ba4d7950fa001d0a9dddfddacb240ae2c69c6c (patch)
treea73ec97082c4b6492b4c5189d62ab468b089a50f /lib/version.c
parentfa9643666128a8ed60e22d4e0fa56e8638726d23 (diff)
- Use libssh2_version() to present the libssh2 version in case the libssh2
library is found to support it.
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/version.c b/lib/version.c
index 2e8f1b410..61a3b3287 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, 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
@@ -49,6 +49,13 @@
#include <libssh2.h>
#endif
+#ifdef HAVE_LIBSSH2_VERSION
+/* get it run-time if possible */
+#define CURL_LIBSSH2_VERSION libssh2_version(0)
+#else
+/* use build-time if run-time not possible */
+#define CURL_LIBSSH2_VERSION LIBSSH2_VERSION
+#endif
char *curl_version(void)
{
@@ -101,7 +108,7 @@ char *curl_version(void)
ptr += len;
#endif
#ifdef USE_LIBSSH2
- len = snprintf(ptr, left, " libssh2/%s", LIBSSH2_VERSION);
+ len = snprintf(ptr, left, " libssh2/%s", CURL_LIBSSH2_VERSION);
left -= len;
ptr += len;
#endif