* [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22
@ 2015-05-12 22:18 John Snow
2015-05-12 22:18 ` [Qemu-devel] [PATCH 1/2] configure: require glib 2.22 John Snow
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: John Snow @ 2015-05-12 22:18 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, pbonzini, John Snow, imammedo
As discussed during the QEMU 2.3 development freeze.
==
For convenience, this branch is available at:
https://github.com/jnsnow/qemu.git branch glib-version-fix
https://github.com/jnsnow/qemu/tree/glib-version-fix
This version is tagged glib-version-fix-v1:
https://github.com/jnsnow/qemu/releases/tag/glib-version-fix-v1
==
John Snow (2):
configure: require glib 2.22
glib: remove stale compat functions
configure | 7 +------
include/glib-compat.h | 35 -----------------------------------
2 files changed, 1 insertion(+), 41 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 1/2] configure: require glib 2.22
2015-05-12 22:18 [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 John Snow
@ 2015-05-12 22:18 ` John Snow
2015-05-22 7:04 ` Alex Bennée
2015-05-12 22:19 ` [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions John Snow
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: John Snow @ 2015-05-12 22:18 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, pbonzini, John Snow, imammedo
This provides g_ptr_array_new_with_free_func, as well as a few
other functions that we've been hacking around in glib-compat.h.
Cleaning up the compatibility headers will come later.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
configure | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/configure b/configure
index 1f0f485..0c86eb2 100755
--- a/configure
+++ b/configure
@@ -2773,12 +2773,7 @@ fi
##########################################
# glib support probe
-if test "$mingw32" = yes; then
- # g_poll is required in order to integrate with the glib main loop.
- glib_req_ver=2.20
-else
- glib_req_ver=2.12
-fi
+glib_req_ver=2.22
glib_modules=gthread-2.0
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-2.0"
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions
2015-05-12 22:18 [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 John Snow
2015-05-12 22:18 ` [Qemu-devel] [PATCH 1/2] configure: require glib 2.22 John Snow
@ 2015-05-12 22:19 ` John Snow
2015-05-22 7:05 ` Alex Bennée
2015-05-13 7:18 ` [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 Markus Armbruster
2015-05-13 9:33 ` Paolo Bonzini
3 siblings, 1 reply; 8+ messages in thread
From: John Snow @ 2015-05-12 22:19 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, pbonzini, John Snow, imammedo
Since we're bumping the version to 2.22+,
remove the now-stale compat functions.
Signed-off-by: John Snow <jsnow@redhat.com>
---
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)
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22
2015-05-12 22:18 [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 John Snow
2015-05-12 22:18 ` [Qemu-devel] [PATCH 1/2] configure: require glib 2.22 John Snow
2015-05-12 22:19 ` [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions John Snow
@ 2015-05-13 7:18 ` Markus Armbruster
2015-05-13 9:33 ` Paolo Bonzini
3 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2015-05-13 7:18 UTC (permalink / raw)
To: John Snow; +Cc: peter.maydell, imammedo, qemu-devel, pbonzini
John Snow <jsnow@redhat.com> writes:
> As discussed during the QEMU 2.3 development freeze.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22
2015-05-12 22:18 [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 John Snow
` (2 preceding siblings ...)
2015-05-13 7:18 ` [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 Markus Armbruster
@ 2015-05-13 9:33 ` Paolo Bonzini
2015-05-21 18:17 ` John Snow
3 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2015-05-13 9:33 UTC (permalink / raw)
To: John Snow, qemu-devel; +Cc: peter.maydell, imammedo
On 13/05/2015 00:18, John Snow wrote:
> As discussed during the QEMU 2.3 development freeze.
>
> ==
> For convenience, this branch is available at:
> https://github.com/jnsnow/qemu.git branch glib-version-fix
> https://github.com/jnsnow/qemu/tree/glib-version-fix
>
> This version is tagged glib-version-fix-v1:
> https://github.com/jnsnow/qemu/releases/tag/glib-version-fix-v1
> ==
>
> John Snow (2):
> configure: require glib 2.22
> glib: remove stale compat functions
>
> configure | 7 +------
> include/glib-compat.h | 35 -----------------------------------
> 2 files changed, 1 insertion(+), 41 deletions(-)
>
Thanks, applied.
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22
2015-05-13 9:33 ` Paolo Bonzini
@ 2015-05-21 18:17 ` John Snow
0 siblings, 0 replies; 8+ messages in thread
From: John Snow @ 2015-05-21 18:17 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: peter.maydell, imammedo
On 05/13/2015 05:33 AM, Paolo Bonzini wrote:
>
>
> On 13/05/2015 00:18, John Snow wrote:
>> As discussed during the QEMU 2.3 development freeze.
>>
>> ==
>> For convenience, this branch is available at:
>> https://github.com/jnsnow/qemu.git branch glib-version-fix
>> https://github.com/jnsnow/qemu/tree/glib-version-fix
>>
>> This version is tagged glib-version-fix-v1:
>> https://github.com/jnsnow/qemu/releases/tag/glib-version-fix-v1
>> ==
>>
>> John Snow (2):
>> configure: require glib 2.22
>> glib: remove stale compat functions
>>
>> configure | 7 +------
>> include/glib-compat.h | 35 -----------------------------------
>> 2 files changed, 1 insertion(+), 41 deletions(-)
>>
>
> Thanks, applied.
>
> Paolo
>
As Paolo will be on PTO tomorrow and I am unappreciative and impatient,
I will be stealing these patches back for the IDE tree to be sent
today/tomorrow.
Thanks! :)
--js
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: require glib 2.22
2015-05-12 22:18 ` [Qemu-devel] [PATCH 1/2] configure: require glib 2.22 John Snow
@ 2015-05-22 7:04 ` Alex Bennée
0 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2015-05-22 7:04 UTC (permalink / raw)
To: John Snow; +Cc: peter.maydell, imammedo, qemu-devel, pbonzini
John Snow <jsnow@redhat.com> writes:
> This provides g_ptr_array_new_with_free_func, as well as a few
> other functions that we've been hacking around in glib-compat.h.
> Cleaning up the compatibility headers will come later.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> configure | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/configure b/configure
> index 1f0f485..0c86eb2 100755
> --- a/configure
> +++ b/configure
> @@ -2773,12 +2773,7 @@ fi
> ##########################################
> # glib support probe
>
> -if test "$mingw32" = yes; then
> - # g_poll is required in order to integrate with the glib main loop.
> - glib_req_ver=2.20
> -else
> - glib_req_ver=2.12
> -fi
> +glib_req_ver=2.22
> glib_modules=gthread-2.0
> if test "$modules" = yes; then
> glib_modules="$glib_modules gmodule-2.0"
--
Alex Bennée
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions
2015-05-12 22:19 ` [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions John Snow
@ 2015-05-22 7:05 ` Alex Bennée
0 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2015-05-22 7:05 UTC (permalink / raw)
To: John Snow; +Cc: peter.maydell, imammedo, qemu-devel, pbonzini
John Snow <jsnow@redhat.com> writes:
> Since we're bumping the version to 2.22+,
> remove the now-stale compat functions.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-05-22 7:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12 22:18 [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 John Snow
2015-05-12 22:18 ` [Qemu-devel] [PATCH 1/2] configure: require glib 2.22 John Snow
2015-05-22 7:04 ` Alex Bennée
2015-05-12 22:19 ` [Qemu-devel] [PATCH 2/2] glib: remove stale compat functions John Snow
2015-05-22 7:05 ` Alex Bennée
2015-05-13 7:18 ` [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22 Markus Armbruster
2015-05-13 9:33 ` Paolo Bonzini
2015-05-21 18:17 ` John Snow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).