aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-04-01 01:16:15 +0100
committerMichael Mann <mmann78@netscape.net>2016-04-03 02:58:04 +0000
commitf95976eefcbeb5d24df383c29d29ef888b503945 (patch)
treeb71c6248cec82341a86e7627ce96fde688d02e05 /wsutil
parenta14e7a7ce19ea2cd0799ebca43d9eaf00aabb27d (diff)
Move zlib version check to wsutil
Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c Reviewed-on: https://code.wireshark.org/review/14747 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/ws_version_info.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/wsutil/ws_version_info.c b/wsutil/ws_version_info.c
index 8298e8226e..e479ab1942 100644
--- a/wsutil/ws_version_info.c
+++ b/wsutil/ws_version_info.c
@@ -33,6 +33,10 @@
#include <glib.h>
+#ifdef HAVE_LIBZ
+#include <zlib.h>
+#endif
+
#include "version.h"
#include <wsutil/ws_version_info.h>
@@ -71,6 +75,20 @@ end_string(GString *str)
}
}
+static const gchar *
+get_zlib_compiled_version_info(void)
+{
+#ifdef HAVE_LIBZ
+#ifdef ZLIB_VERSION
+ return "with libz "ZLIB_VERSION;
+#else
+ return "with libz (version unknown)";
+#endif /* ZLIB_VERSION */
+#else
+ return "without libz";
+#endif /* HAVE_LIBZ */
+}
+
/*
* Get various library compile-time versions, put them in a GString,
* and return the GString.
@@ -112,6 +130,8 @@ get_compiled_version_info(void (*prepend_info)(GString *),
"GLib (version unknown)");
#endif
+ g_string_append_printf(str, ", %s", get_zlib_compiled_version_info());
+
/* Additional application-dependent information */
if (append_info)
(*append_info)(str);
@@ -334,6 +354,11 @@ get_runtime_version_info(void (*additional_info)(GString *))
if (additional_info)
(*additional_info)(str);
+ /* zlib */
+#if defined(HAVE_LIBZ) && !defined(_WIN32)
+ g_string_append_printf(str, ", with libz %s", zlibVersion());
+#endif
+
g_string_append(str, ".");
/* CPU Info */