diff options
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/ws_version_info.c | 25 |
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 */ |