[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 13/16] qemu-common: move glib-compat.h
From: |
marcandre . lureau |
Subject: |
[PATCH v3 13/16] qemu-common: move glib-compat.h |
Date: |
Wed, 10 Aug 2022 16:48:54 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
qemu-common will have compatible dependency requirements with QEMU.
Since qemu-common won't have a toplevel qemu/osdep.h which would include
various system headers, include stdbool.h (bool is used for some
declarations here).
Replace getenv() with g_getenv() to avoid extra header inclusion.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
---
{include => subprojects/qemu-common/include}/glib-compat.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
rename {include => subprojects/qemu-common/include}/glib-compat.h (97%)
diff --git a/include/glib-compat.h
b/subprojects/qemu-common/include/glib-compat.h
similarity index 97%
rename from include/glib-compat.h
rename to subprojects/qemu-common/include/glib-compat.h
index 43a562974d..2b0f2962f3 100644
--- a/include/glib-compat.h
+++ b/subprojects/qemu-common/include/glib-compat.h
@@ -30,6 +30,8 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <glib.h>
+#include <stdbool.h>
+
#if defined(G_OS_UNIX)
#include <glib-unix.h>
#include <sys/types.h>
@@ -133,7 +135,7 @@ qemu_g_test_slow(void)
{
static int cached = -1;
if (cached == -1) {
- cached = g_test_slow() || getenv("G_TEST_SLOW") != NULL;
+ cached = g_test_slow() || g_getenv("G_TEST_SLOW") != NULL;
}
return cached;
}
--
2.37.1
- [PATCH v3 00/16] Preliminary patches for subproject split, marcandre . lureau, 2022/08/10
- [PATCH v3 01/16] error-report: misc comment fix, marcandre . lureau, 2022/08/10
- [PATCH v3 02/16] error-report: introduce "detailed" variable, marcandre . lureau, 2022/08/10
- [PATCH v3 03/16] error-report: simplify print_loc(), marcandre . lureau, 2022/08/10
- [PATCH v3 04/16] error-report: introduce overridable error_is_detailed(), marcandre . lureau, 2022/08/10
- [PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp(), marcandre . lureau, 2022/08/10
- [PATCH v3 06/16] qapi: move QEMU-specific dispatch code in monitor, marcandre . lureau, 2022/08/10
- [PATCH v3 07/16] qapi: remove QEMU-specific monitor dependency from dispatch, marcandre . lureau, 2022/08/10
- [PATCH v3 08/16] scripts/qapi-gen: add -i option, marcandre . lureau, 2022/08/10
- [PATCH v3 13/16] qemu-common: move glib-compat.h,
marcandre . lureau <=
- [PATCH v3 16/16] qemu-common: add error-report test, marcandre . lureau, 2022/08/10
- [PATCH v3 12/16] qemu-common: move scripts/qapi, marcandre . lureau, 2022/08/10
- [PATCH v3 14/16] qemu-common: move error-report, marcandre . lureau, 2022/08/10
- [PATCH v3 15/16] mtest2make.py: teach suite name that are just "PROJECT", marcandre . lureau, 2022/08/10
- [PATCH v3 11/16] qemu-common: introduce a common subproject, marcandre . lureau, 2022/08/10
- [PATCH v3 09/16] scripts/qapi: add required system includes to visitor, marcandre . lureau, 2022/08/10
- [PATCH v3 10/16] util: move 256-by-128 division helpers to int128, marcandre . lureau, 2022/08/10