Bump GLib minimum required version to 2.22.0

Change-Id: I0ab85be8090f234f9ca10914063f97f13c894413
Reviewed-on: https://code.wireshark.org/review/16879
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2016-08-04 12:11:09 +01:00 committed by João Valverde
parent 47e2849ada
commit d21295f9a6
11 changed files with 2 additions and 133 deletions

View File

@ -651,7 +651,7 @@ set(PACKAGELIST Gettext M Git GLIB2 GMODULE2 GTHREAD2 LEX YACC Perl SED SH Pytho
set(LEX_REQUIRED TRUE)
set(GLIB2_REQUIRED TRUE)
set(GLIB2_FIND_REQUIRED TRUE)
set(GLIB2_MIN_VERSION 2.14.0)
set(GLIB2_MIN_VERSION 2.22.0)
set(GTHREAD2_REQUIRED TRUE)
set(PythonInterp_FIND_VERSION 2)
set(Python_ADDITIONAL_VERSIONS 3)

View File

@ -1176,7 +1176,7 @@ else
AC_MSG_RESULT(no)
fi
GLIB_MIN_VERSION=2.16.0
GLIB_MIN_VERSION=2.22.0
AC_SUBST(GLIB_MIN_VERSION)
# GLib checks; we require GLib $GLIB_MIN_VERSION or later, and require gmodule
# support, as we need that for dynamically loading plugins.

View File

@ -120,7 +120,6 @@ set(LIBWIRESHARK_FILES
frame_data.c
frame_data_sequence.c
funnel.c
g_int64_hash_routines.c
geoip_db.c
golay.c
guid-utils.c

View File

@ -82,7 +82,6 @@ LIBWIRESHARK_SRC = \
frame_data.c \
frame_data_sequence.c \
funnel.c \
g_int64_hash_routines.c \
geoip_db.c \
golay.c \
guid-utils.c \

View File

@ -31,7 +31,6 @@
#include <epan/prefs.h>
#include <epan/etypes.h>
#include <epan/show_exception.h>
#include <epan/g_int64_hash_routines.h>
#include <wiretap/erf.h>
#include "packet-infiniband.h"

View File

@ -35,7 +35,6 @@
#include <epan/reassemble.h>
#include <epan/to_str.h>
#include <epan/strutil.h>
#include <epan/g_int64_hash_routines.h>
#include "packet-gsm_a_common.h"
#include "packet-gsm_map.h"

View File

@ -30,7 +30,6 @@
#include <epan/conversation.h>
#include <epan/packet.h>
#include <epan/g_int64_hash_routines.h>
#include "packet-scsi.h"
void proto_reg_handoff_rsvd(void);

View File

@ -37,7 +37,6 @@
#include <epan/addr_resolv.h>
#include <epan/wmem/wmem.h>
#include <epan/conversation.h>
#include <epan/g_int64_hash_routines.h>
#include <epan/dissectors/packet-tcp.h>
#define RTITCP_MAGIC_NUMBER 0xdd54dd55

View File

@ -1,76 +0,0 @@
/* g_int64_hash_routines.h
* Definition of gint64 hash table routines absent from GLib < 2.22
*
* From:
*
* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser 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.
*/
/*
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GLib Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <epan/g_int64_hash_routines.h>
#if !GLIB_CHECK_VERSION(2,22,0)
/**
* g_int64_equal:
* @v1: a pointer to a #gint64 key
* @v2: a pointer to a #gint64 key to compare with @v1
*
* Compares the two #gint64 values being pointed to and returns
* %TRUE if they are equal.
* It can be passed to g_hash_table_new() as the @key_equal_func
* parameter, when using non-%NULL pointers to 64-bit integers as keys in a
* #GHashTable.
*
* Returns: %TRUE if the two keys match.
*
* Since: 2.22
*/
gboolean
g_int64_equal (gconstpointer v1,
gconstpointer v2)
{
return *((const gint64*) v1) == *((const gint64*) v2);
}
/**
* g_int64_hash:
* @v: a pointer to a #gint64 key
*
* Converts a pointer to a #gint64 to a hash value.
*
* It can be passed to g_hash_table_new() as the @hash_func parameter,
* when using non-%NULL pointers to 64-bit integer values as keys in a
* #GHashTable.
*
* Returns: a hash value corresponding to the key.
*
* Since: 2.22
*/
guint
g_int64_hash (gconstpointer v)
{
return (guint) *(const gint64*) v;
}
#endif /* !GLIB_CHECK_VERSION(2,22,0) */

View File

@ -1,45 +0,0 @@
/* 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>
#include "ws_symbol_export.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)
WS_DLL_PUBLIC guint
g_int64_hash (gconstpointer v);
WS_DLL_PUBLIC 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 */

View File

@ -89,11 +89,7 @@ in_cksum(const vec_t *vec, int veclen)
/*
* Force to even boundary.
*/
#if GLIB_CHECK_VERSION(2,18,0)
if ((1 & (gintptr)w) && (mlen > 0)) {
#else
if ((1 & (unsigned long) w) && (mlen > 0)) {
#endif /* GLIB_CHECK_VERSION(2,18,0) */
REDUCE;
sum <<= 8;
s_util.c[0] = *(const guint8 *)w;