From f95976eefcbeb5d24df383c29d29ef888b503945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 1 Apr 2016 01:16:15 +0100 Subject: Move zlib version check to wsutil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c Reviewed-on: https://code.wireshark.org/review/14747 Petri-Dish: João Valverde Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- wsutil/ws_version_info.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'wsutil/ws_version_info.c') 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 +#ifdef HAVE_LIBZ +#include +#endif + #include "version.h" #include @@ -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 */ -- cgit v1.2.1