replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
[metze/wireshark/wip.git] / wsutil / glib-compat.h
1 /* glib-compat.h
2 * Definitions to provide some functions that are not present in older
3 * GLIB versions (down to 2.22)
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11 #ifndef GLIB_COMPAT_H
12 #define GLIB_COMPAT_H
13
14 #include "ws_symbol_export.h"
15 #include "ws_attributes.h"
16
17 #if !GLIB_CHECK_VERSION(2, 28, 0)
18 WS_DLL_PUBLIC void g_slist_free_full(GSList *list, GDestroyNotify  free_func);
19 WS_DLL_PUBLIC void g_list_free_full(GList *list, GDestroyNotify free_func);
20 WS_DLL_PUBLIC gint64 g_get_monotonic_time (void);
21 #endif /* !GLIB_CHECK_VERSION(2, 28, 0) */
22
23 #if !GLIB_CHECK_VERSION(2, 30, 0)
24 WS_DLL_PUBLIC GPtrArray* g_ptr_array_new_full(guint reserved_size, GDestroyNotify element_free_func);
25 #endif /* !GLIB_CHECK_VERSION(2, 30, 0) */
26
27 #if !GLIB_CHECK_VERSION(2,31,18)
28 WS_DLL_PUBLIC gpointer g_async_queue_timeout_pop(GAsyncQueue *queue, guint64 timeout);
29 #endif /* !GLIB_CHECK_VERSION(2,31,18) */
30
31 #if !GLIB_CHECK_VERSION(2,31,0)
32 WS_DLL_PUBLIC GThread *g_thread_new (const gchar *name, GThreadFunc func, gpointer data);
33 #endif /* !GLIB_CHECK_VERSION(2,31,0) */
34
35 #endif /* GLIB_COMPAT_H */