![Daniel P. Berrangé](/assets/img/avatar_default.png)
Per supported platforms doc[1], the various min glib on relevant distros is: RHEL-7: 2.50.3 Debian (Stretch): 2.50.3 Debian (Jessie): 2.42.1 OpenBSD (Ports): 2.54.3 FreeBSD (Ports): 2.50.3 OpenSUSE Leap 15: 2.54.3 SLE12-SP2: 2.48.2 Ubuntu (Xenial): 2.48.0 macOS (Homebrew): 2.56.0 This suggests that a minimum glib of 2.42 is a reasonable target. The GLibC compile farm, however, uses Ubuntu 14.04 (Trusty) which only has glib 2.40.0, and this is needed for testing during merge. Thus an exception is made to the documented platform support policy to allow for all three current LTS releases to be supported. Docker jobs that not longer satisfy this new min version are removed. [1] https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
49 lines
1.8 KiB
C
49 lines
1.8 KiB
C
/*
|
|
* GLIB Compatibility Functions
|
|
*
|
|
* Copyright IBM, Corp. 2013
|
|
*
|
|
* Authors:
|
|
* Anthony Liguori <aliguori@us.ibm.com>
|
|
* Michael Tokarev <mjt@tls.msk.ru>
|
|
* Paolo Bonzini <pbonzini@redhat.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef QEMU_GLIB_COMPAT_H
|
|
#define QEMU_GLIB_COMPAT_H
|
|
|
|
#include <glib.h>
|
|
|
|
#if defined(_WIN32) && !GLIB_CHECK_VERSION(2, 50, 0)
|
|
/*
|
|
* g_poll has a problem on Windows when using
|
|
* timeouts < 10ms, so use wrapper.
|
|
*/
|
|
#define g_poll(fds, nfds, timeout) g_poll_fixed(fds, nfds, timeout)
|
|
gint g_poll_fixed(GPollFD *fds, guint nfds, gint timeout);
|
|
#endif
|
|
|
|
|
|
#ifndef g_assert_cmpmem
|
|
#define g_assert_cmpmem(m1, l1, m2, l2) \
|
|
do { \
|
|
gconstpointer __m1 = m1, __m2 = m2; \
|
|
int __l1 = l1, __l2 = l2; \
|
|
if (__l1 != __l2) { \
|
|
g_assertion_message_cmpnum( \
|
|
G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
#l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", __l1, "==", \
|
|
__l2, 'i'); \
|
|
} else if (memcmp(__m1, __m2, __l1) != 0) { \
|
|
g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
"assertion failed (" #m1 " == " #m2 ")"); \
|
|
} \
|
|
} while (0)
|
|
#endif
|
|
|
|
#endif
|