aboutsummaryrefslogtreecommitdiffstats
path: root/epan/g_int64_hash_routines.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-16 11:32:39 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-16 19:33:57 +0000
commitcfb1bc3bb44d6b5a12eac28905b02e6a3a60d17b (patch)
tree6e75b150888d6a67bd76af6dc667527b809ca770 /epan/g_int64_hash_routines.h
parent4765bbc2a906a6ce4f141aa5beb46c553b4667bd (diff)
Put the 64-bit hash routines into a common file.
Some or all are used by the Infiniband, MBIM, and RSVD dissectors; put them into a common source file, with a header for them, and just include the header in the dissectors. Change-Id: I724f0c2232ba751ccbd491222af6f03bafd6d63c Reviewed-on: https://code.wireshark.org/review/7182 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/g_int64_hash_routines.h')
-rw-r--r--epan/g_int64_hash_routines.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/epan/g_int64_hash_routines.h b/epan/g_int64_hash_routines.h
new file mode 100644
index 0000000000..e606ebec5d
--- /dev/null
+++ b/epan/g_int64_hash_routines.h
@@ -0,0 +1,43 @@
+/* g_int64_hash_routines.h
+ * Declaration of gint64 hash table routines absent from GLib < 2.22
+ *
+ * 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.
+ */
+
+#ifndef __G_INT64_HASH_ROUTINES_H__
+#define __G_INT64_HASH_ROUTINES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <glib.h>
+
+/* g_int64_hash, g_int64_equal are defined starting glib 2.22 - otherwise,
+ we have to provide them ourselves */
+#if !GLIB_CHECK_VERSION(2,22,0)
+guint
+g_int64_hash (gconstpointer v);
+
+gboolean
+g_int64_equal (gconstpointer v1,
+ gconstpointer v2)
+#endif /* !GLIB_CHECK_VERSION(2,22,0) */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* g_int64_hash_routines.h */