mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 11:06:18 +00:00
Remove glib-compat.h
Not used since 03d46e9e "build-sys: Raise glib requirement to 2.38" in
2019-02-05
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
b939e70d9c
commit
7848ee3faf
@ -97,7 +97,6 @@ libserver_la_SOURCES = \
|
||||
display-channel-private.h \
|
||||
display-limits.h \
|
||||
event-loop.c \
|
||||
glib-compat.h \
|
||||
glz-encoder.c \
|
||||
glz-encoder-dict.c \
|
||||
glz-encoder-dict.h \
|
||||
|
||||
@ -29,7 +29,6 @@ typedef struct RedCharDeviceClientOpaque RedCharDeviceClientOpaque;
|
||||
|
||||
#include "char-device.h"
|
||||
#include "reds.h"
|
||||
#include "glib-compat.h"
|
||||
|
||||
#define CHAR_DEVICE_WRITE_TO_TIMEOUT 100
|
||||
#define RED_CHAR_DEVICE_WAIT_TOKENS_TIMEOUT 30000
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
#include "red-client.h"
|
||||
#include "main-channel-client.h"
|
||||
#include <spice-server-enums.h>
|
||||
#include "glib-compat.h"
|
||||
|
||||
G_DEFINE_TYPE(DisplayChannelClient, display_channel_client, TYPE_COMMON_GRAPHICS_CHANNEL_CLIENT)
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include <common/sw_canvas.h>
|
||||
|
||||
#include "display-channel-private.h"
|
||||
#include "glib-compat.h"
|
||||
#include "red-qxl.h"
|
||||
|
||||
G_DEFINE_TYPE(DisplayChannel, display_channel, TYPE_COMMON_GRAPHICS_CHANNEL)
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
Copyright (C) 2016 Red Hat, Inc.
|
||||
|
||||
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.1 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 Lesser General Public
|
||||
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GLIB_COMPAT_H_
|
||||
#define GLIB_COMPAT_H_
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2,34,0)
|
||||
#define g_clear_pointer(pp, destroy) \
|
||||
G_STMT_START { \
|
||||
SPICE_VERIFY (sizeof *(pp) == sizeof (gpointer)); \
|
||||
/* Only one access, please */ \
|
||||
gpointer *_pp = (gpointer *) (pp); \
|
||||
gpointer _p; \
|
||||
/* This assignment is needed to avoid a gcc warning */ \
|
||||
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
|
||||
\
|
||||
_p = *_pp; \
|
||||
if (_p) \
|
||||
{ \
|
||||
*_pp = NULL; \
|
||||
_destroy (_p); \
|
||||
} \
|
||||
} G_STMT_END
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2,32,0)
|
||||
static inline void
|
||||
g_queue_free_full(GQueue *queue, GDestroyNotify free_func)
|
||||
{
|
||||
/* quite hack cast but work with standard C call convention */
|
||||
g_queue_foreach(queue, (GFunc) free_func, NULL);
|
||||
g_queue_clear(queue);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2,30,0)
|
||||
static inline gboolean
|
||||
g_queue_remove_boolean(GQueue *queue, gconstpointer data)
|
||||
{
|
||||
GList *link = g_queue_find(queue, data);
|
||||
if (!link) {
|
||||
return FALSE;
|
||||
}
|
||||
g_queue_unlink(queue, link);
|
||||
return TRUE;
|
||||
}
|
||||
#define g_queue_remove g_queue_remove_boolean
|
||||
#endif
|
||||
|
||||
#endif /* GLIB_COMPAT_H_ */
|
||||
@ -67,7 +67,6 @@ spice_server_sources = [
|
||||
'display-channel-private.h',
|
||||
'display-limits.h',
|
||||
'event-loop.c',
|
||||
'glib-compat.h',
|
||||
'glz-encoder.c',
|
||||
'glz-encoder-dict.c',
|
||||
'glz-encoder-dict.h',
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
|
||||
#include "red-channel-client.h"
|
||||
#include "red-client.h"
|
||||
#include "glib-compat.h"
|
||||
|
||||
#define CLIENT_ACK_WINDOW 20
|
||||
|
||||
|
||||
@ -75,7 +75,6 @@
|
||||
#include "red-channel-client.h"
|
||||
#include "main-channel-client.h"
|
||||
#include "red-client.h"
|
||||
#include "glib-compat.h"
|
||||
#include "net-utils.h"
|
||||
#include "red-stream-device.h"
|
||||
|
||||
|
||||
@ -20,8 +20,6 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "glib-compat.h"
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 34, 0)
|
||||
void g_test_assert_expected_messages_internal(const char *domain,
|
||||
const char *file, int line, const char *func);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user