From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvh1n-00012u-5e for qemu-devel@nongnu.org; Fri, 22 May 2015 03:05:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvh1j-0001sR-6M for qemu-devel@nongnu.org; Fri, 22 May 2015 03:05:55 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:55537 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvh1j-0001sN-0U for qemu-devel@nongnu.org; Fri, 22 May 2015 03:05:51 -0400 References: <1431469140-22208-1-git-send-email-jsnow@redhat.com> <1431469140-22208-3-git-send-email-jsnow@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1431469140-22208-3-git-send-email-jsnow@redhat.com> Date: Fri, 22 May 2015 08:05:52 +0100 Message-ID: <871ti9hz1r.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: peter.maydell@linaro.org, imammedo@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com John Snow writes: > Since we're bumping the version to 2.22+, > remove the now-stale compat functions. > > Signed-off-by: John Snow Reviewed-by: Alex Bennée > --- > include/glib-compat.h | 35 ----------------------------------- > 1 file changed, 35 deletions(-) > > diff --git a/include/glib-compat.h b/include/glib-compat.h > index 28d9f15..318e000 100644 > --- a/include/glib-compat.h > +++ b/include/glib-compat.h > @@ -23,14 +23,6 @@ > #define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT(1000000)) > #endif > > -#if !GLIB_CHECK_VERSION(2, 14, 0) > -static inline guint g_timeout_add_seconds(guint interval, GSourceFunc function, > - gpointer data) > -{ > - return g_timeout_add(interval * 1000, function, data); > -} > -#endif > - > #if !GLIB_CHECK_VERSION(2, 28, 0) > static inline gint64 qemu_g_get_monotonic_time(void) > { > @@ -47,23 +39,6 @@ static inline gint64 qemu_g_get_monotonic_time(void) > #define g_get_monotonic_time() qemu_g_get_monotonic_time() > #endif > > -#if !GLIB_CHECK_VERSION(2, 16, 0) > -static inline int g_strcmp0(const char *str1, const char *str2) > -{ > - int result; > - > - if (!str1) { > - result = -(str1 != str2); > - } else if (!str2) { > - result = (str1 != str2); > - } else { > - result = strcmp(str1, str2); > - } > - > - return result; > -} > -#endif > - > #ifdef _WIN32 > /* > * g_poll has a problem on Windows when using > @@ -71,16 +46,6 @@ static inline int g_strcmp0(const char *str1, const char *str2) > */ > #define g_poll(fds, nfds, timeout) g_poll_fixed(fds, nfds, timeout) > gint g_poll_fixed(GPollFD *fds, guint nfds, gint timeout); > -#elif !GLIB_CHECK_VERSION(2, 20, 0) > -/* > - * Glib before 2.20.0 doesn't implement g_poll, so wrap it to compile properly > - * on older systems. > - */ > -static inline gint g_poll(GPollFD *fds, guint nfds, gint timeout) > -{ > - GMainContext *ctx = g_main_context_default(); > - return g_main_context_get_poll_func(ctx)(fds, nfds, timeout); > -} > #endif > > #if !GLIB_CHECK_VERSION(2, 31, 0) -- Alex Bennée