aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/glib_version_info.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-07-03 08:09:46 -0700
committerGuy Harris <guy@alum.mit.edu>2014-07-03 15:10:25 +0000
commitf3c62edc7738f30f5ccf3861e4839539fd558367 (patch)
treeb69bd852c0c263facdc2f575e7b66dfe32eef2da /wsutil/glib_version_info.c
parent87cf0433cceb1b4e6e726ca236d11985e4e9f15c (diff)
Move the GLib version info string stuff to get_glib_version_info().
Change-Id: I1013ad9a0a98bcbf07fe597f9e932f2ea1a5cd28 Reviewed-on: https://code.wireshark.org/review/2818 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/glib_version_info.c')
-rw-r--r--wsutil/glib_version_info.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/wsutil/glib_version_info.c b/wsutil/glib_version_info.c
new file mode 100644
index 0000000000..7252a16cd9
--- /dev/null
+++ b/wsutil/glib_version_info.c
@@ -0,0 +1,44 @@
+/* glib_version_info.c
+ * Routines to report GLib version information
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+
+#include <wsutil/glib_version_info.h>
+
+/*
+ * Get the GLib version, and append it to the GString
+ */
+void
+get_glib_version_info(GString *str)
+{
+ /* GLIB */
+ g_string_append(str, "with ");
+ g_string_append_printf(str,
+#ifdef GLIB_MAJOR_VERSION
+ "GLib %d.%d.%d", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION,
+ GLIB_MICRO_VERSION);
+#else
+ "GLib (version unknown)");
+#endif
+}