From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH v2 2/7] glib: move g_poll() replacement into glib-compat.h
Date: Sat, 03 May 2014 13:11:51 +0400 [thread overview]
Message-ID: <5364B2D7.8060306@msgid.tls.msk.ru> (raw)
In-Reply-To: <1399041361-30496-3-git-send-email-mjt@msgid.tls.msk.ru>
02.05.2014 18:35, Michael Tokarev wrote:
> From: Stefan Hajnoczi <stefanha@redhat.com>
>
> We have a dedicated header file for wrappers to smooth over glib version
> differences. Move the g_poll() definition into glib-compat.h for
> consistency.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> Cc: qemu-trivial@nongnu.org
Applied to -trivial, thanks!
/mjt
> include/glib-compat.h | 12 ++++++++++++
> include/qemu-common.h | 12 ------------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/glib-compat.h b/include/glib-compat.h
> index 8aa77af..8d25900 100644
> --- a/include/glib-compat.h
> +++ b/include/glib-compat.h
> @@ -24,4 +24,16 @@ static inline guint g_timeout_add_seconds(guint interval, GSourceFunc function,
> }
> #endif
>
> +#if !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
> +
> #endif
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index a998e8d..3f3fd60 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -124,18 +124,6 @@ int qemu_main(int argc, char **argv, char **envp);
> void qemu_get_timedate(struct tm *tm, int offset);
> int qemu_timedate_diff(struct tm *tm);
>
> -#if !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
> -
> /**
> * is_help_option:
> * @s: string to test
>
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 2/7] glib: move g_poll() replacement into glib-compat.h
Date: Sat, 03 May 2014 13:11:51 +0400 [thread overview]
Message-ID: <5364B2D7.8060306@msgid.tls.msk.ru> (raw)
In-Reply-To: <1399041361-30496-3-git-send-email-mjt@msgid.tls.msk.ru>
02.05.2014 18:35, Michael Tokarev wrote:
> From: Stefan Hajnoczi <stefanha@redhat.com>
>
> We have a dedicated header file for wrappers to smooth over glib version
> differences. Move the g_poll() definition into glib-compat.h for
> consistency.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> Cc: qemu-trivial@nongnu.org
Applied to -trivial, thanks!
/mjt
> include/glib-compat.h | 12 ++++++++++++
> include/qemu-common.h | 12 ------------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/glib-compat.h b/include/glib-compat.h
> index 8aa77af..8d25900 100644
> --- a/include/glib-compat.h
> +++ b/include/glib-compat.h
> @@ -24,4 +24,16 @@ static inline guint g_timeout_add_seconds(guint interval, GSourceFunc function,
> }
> #endif
>
> +#if !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
> +
> #endif
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index a998e8d..3f3fd60 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -124,18 +124,6 @@ int qemu_main(int argc, char **argv, char **envp);
> void qemu_get_timedate(struct tm *tm, int offset);
> int qemu_timedate_diff(struct tm *tm);
>
> -#if !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
> -
> /**
> * is_help_option:
> * @s: string to test
>
next prev parent reply other threads:[~2014-05-03 9:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 14:35 [Qemu-devel] [PATCH v2 0/7] glib thread interface and libcacard cleanups Michael Tokarev
2014-05-02 14:35 ` [Qemu-trivial] [PATCH v2 1/7] do not call g_thread_init() for glib >= 2.31 Michael Tokarev
2014-05-02 14:35 ` [Qemu-devel] " Michael Tokarev
2014-05-03 9:11 ` [Qemu-trivial] " Michael Tokarev
2014-05-03 9:11 ` [Qemu-devel] " Michael Tokarev
2014-05-02 14:35 ` [Qemu-trivial] [PATCH v2 2/7] glib: move g_poll() replacement into glib-compat.h Michael Tokarev
2014-05-02 14:35 ` [Qemu-devel] " Michael Tokarev
2014-05-03 9:11 ` Michael Tokarev [this message]
2014-05-03 9:11 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-05-02 14:35 ` [Qemu-devel] [PATCH v2 3/7] glib-compat.h: add new thread API emulation on top of pre-2.31 API Michael Tokarev
2014-05-02 14:35 ` [Qemu-devel] [PATCH v2 4/7] vscclient: use glib thread primitives not qemu Michael Tokarev
2014-05-02 14:35 ` [Qemu-trivial] [PATCH v2 5/7] libcacard: replace pstrcpy() with memcpy() Michael Tokarev
2014-05-02 14:35 ` [Qemu-devel] " Michael Tokarev
2014-05-02 14:36 ` [Qemu-devel] [PATCH v2 6/7] libcacard: replace qemu thread primitives with glib ones Michael Tokarev
2014-05-02 14:36 ` [Qemu-devel] [PATCH v2 7/7] libcacard: actually use symbols file Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5364B2D7.8060306@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.