aboutsummaryrefslogtreecommitdiff
path: root/src/common/torgzip.c
diff options
context:
space:
mode:
authorKevin Butler <haqkrs@gmail.com>2013-09-01 17:38:01 +0100
committerKevin Butler <haqkrs@gmail.com>2013-09-01 17:38:01 +0100
commit6e17fa6d7ba57b990dd929e07969d35dc82fc46b (patch)
treecb6d7b7e79941df0dec6b7379821c6e8f2cbebe8 /src/common/torgzip.c
parent00bcc25d05dc0273323a2cae20c6aa62afd4b50a (diff)
downloadtor-6e17fa6d7ba57b990dd929e07969d35dc82fc46b.tar.gz
tor-6e17fa6d7ba57b990dd929e07969d35dc82fc46b.zip
Added --library-versions flag to print the compile time and runtime versions of libevent, openssl and zlib. Partially implements #6384.
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r--src/common/torgzip.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 4328c63c8b..15451ee30d 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -68,6 +68,22 @@ is_gzip_supported(void)
return gzip_is_supported;
}
+/** Return a string representation of the version of the currently running
+ * version of zlib. */
+const char *
+tor_zlib_get_version_str(void)
+{
+ return zlibVersion();
+}
+
+/** Return a string representation of the version of the version of zlib
+* used at compilation. */
+const char *
+tor_zlib_get_header_version_str(void)
+{
+ return ZLIB_VERSION;
+}
+
/** Return the 'bits' value to tell zlib to use <b>method</b>.*/
static INLINE int
method_bits(compress_method_t method)