Commit Graph

15 Commits

Author SHA1 Message Date
John Thacker 2dd07bc5b9 glib: Bump required version to 2.50
All the currently supported distributions have at least 2.50.
Remove a version check.
2022-04-22 12:55:37 +00:00
Paul Koning 6231bdc716 Fix Linux build issue
This fixes an error due to memcpy not being declared.  Closes #17911.
2022-01-27 04:43:52 +00:00
Moshe Kaplan e45ad9dcef wsutil: Add header files to Doxygen
Add @file markers for wsutil
headers so that Doxygen will
generate documentation for them.
2021-11-30 07:30:34 +00:00
Balint Reczey 9f92da75b8 wsutil: Provide static inline g_memdup2 in glib-compat.h to not export it
Shared libraries should not export symbols exported by other libraries to avoid
collisions.

Fixes #17645.
2021-10-11 21:51:35 +02:00
Dario Lombardo ea929d6401 wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68,
we provide our own copy of g_memdup2() for older GLib versions.
2021-03-25 09:38:10 +00:00
Joerg Mayer 10134e9453 glib-compat is no longer used - it provided only code for versions < 2.32
Change-Id: I17e2c221cc40dbe9328458db9f17480c05bdc276
Reviewed-on: https://code.wireshark.org/review/26972
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-16 17:47:08 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Peter Wu bad83f249f Fix build and thread runtime compat with older GLib
CentOS 6 ships with glib 2.28.8 which do not support
g_ptr_array_new_full (make-taps/make-dissectors) and need to link with
wsutil for glib-compat.

g_thread_new was only introduced with GLib 2.32 (not 2.31), so adjust
the check accordingly. Abort in case thread creation fails (as
documented). Properly initialize threads or it will abort on runtime
(this also requires linking epan with gthreads in CMake, autotools
already includes it with GLIB_LIBS).

Change-Id: Ie81d6df7b3b26aaa4eb25e23719a220755e2c13c
Reviewed-on: https://code.wireshark.org/review/24978
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-24 20:22:58 +00:00
Michael Mann 3d673da88c Convert to using use SPDX identifier on wsutil directory
Change-Id: Id73e641499e75bc1afc1dea29682418156f461fe
Reviewed-on: https://code.wireshark.org/review/24751
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-10 04:36:29 +00:00
AndersBroman 290fd76af6 [glib-compat] #include "ws_attributes.h" needed to handle _U_
Change-Id: Ie7aa8ef0a2ec8e65947e214488809d0df0ee015b
Reviewed-on: https://code.wireshark.org/review/24670
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-01 12:02:16 +00:00
Gerald Combs 67ffa3cf7d Threads: Set lifetimes and add a compatibility routine.
Join the protocol registration threads so that they call g_thread_unref
which in turn detaches/terminates the thread. This gets rid of many TSan
and DRD errors here. The remaining ones appear to be false positives.

Add g_thread_new to glib-compat (untested).

Change-Id: I4beb6746ed08656715cf7870ac63ff80cf1ef871
Reviewed-on: https://code.wireshark.org/review/24619
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-29 04:43:41 +00:00
AndersBroman 243fa8c441 [glib-compat] g_async_queue_timeout_pop() needed for older glibs
(2.31.18)

Change-Id: I727c8548c29b3409fab819dce072e86153232911
Reviewed-on: https://code.wireshark.org/review/24550
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-23 14:46:20 +00:00
AndersBroman db811a699d [glib-compat] Add g_ptr_array_new_full().
Change-Id: Ic0e054cbb28106cc02f229ad4f2476b39e544378
Reviewed-on: https://code.wireshark.org/review/24544
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-23 11:41:37 +00:00
Martin Mathieson 8638eb91c7 Add g_get_monotonic_time() to glib-compat and use
Change-Id: If41dab19692516270e8b4bcf1a8a954bb8dc3ccc
Reviewed-on: https://code.wireshark.org/review/21480
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-04 03:45:07 +00:00
AndersBroman e2e4415c9f Add some glib functions not available in older glibs
Change-Id: I6526d799447a3b6c0b9bb42f8d0f8c3415299ed0
Reviewed-on: https://code.wireshark.org/review/20158
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-02-20 12:55:49 +00:00