Misc changes to allow building with Windows Clang
Subsystems (5)
v2 cover Misc changes to allow building with Windows Clang
v2 -> v1:
- Added additional commits to remove strcasecmp/strncasecmp usage in favor of g_ascii_strcasecmp/g_ascii_strncasecmp
- Don't remove dirent.h from util/drm.c since it's used there
- Updated commit messages with more explanation
v1: https://patchew.org/QEMU/[email protected]/
Kostiantyn Kostiuk (14):
meson: Use stddef.h instead of unistd.h
qom: Use g_ascii_strcasecmp instead of strcasecmp
block: Use glib2 instead of strcasecmp/strncasecmp
io: Use glib2 instead of strcasecmp/strncasecmp hw/arm: Use glib2 instead of strcasecmp/strncasecmp target/sparc: Use glib2 instead of strcasecmp/strncasecmp target/riscv: Use glib2 instead of strcasecmp/strncasecmp target/ppc: Use glib2 instead of strcasecmp/strncasecmp target/xtensa: Use glib2 instead of strcasecmp/strncasecmp hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
osdep: Remove unused strings.h
util: Remove unused dirent.h
util: Remove unused sys/param.h
meson: Don't require nm for non-modular builds
Paolo Bonzini (1):
storage-daemon: use same link arguments as other tools
block/curl.c | 4 ++-- hw/arm/xilinx_zynq.c | 8 ++++---- hw/ppc/spapr_caps.c | 2 +- include/qemu/osdep.h | 1 - io/channel-websock.c | 4 ++-- meson.build | 35 +++++++++++++++++++---------------- qom/object.c | 4 ++-- storage-daemon/meson.build | 16 ++++++++-------- target/ppc/kvm.c | 2 +- target/riscv/monitor.c | 4 ++-- target/sparc/cpu.c | 8 ++++---- target/xtensa/xtensa-isa.c | 4 ++-- util/path.c | 2 -- 13 files changed, 47 insertions(+), 47 deletions(-)
--
2.52.0
PATCH v2 1/15 meson: Use stddef.h instead of unistd.h
POSIX says stddef.h provides size_t, which is the only thing we care about here. unistd.h can be missing in non-POSIX runtimes, so include stddef.h instead.
--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -1057,7 +1057,7 @@ endif if not cc.compiles(''' #include <glib.h> - #include <unistd.h> + #include <stddef.h> #define QEMU_BUILD_BUG_ON(x) \ typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
Signature · 1 line
2.52.0
Re: [PATCH v2 01/15] meson: Use stddef.h instead of unistd.h
Quoted 7 lines · Kostiantyn Kostiuk
POSIX says
stddef.hprovidessize_t, which is the only thing we care about here.unistd.hcan be missing in non-POSIX runtimes, so includestddef.hinstead.Signed-off-by Kostiantyn Kostiuk <[email protected]>---
thanks
-- PMM
PATCH v2 2/15 qom: Use g_ascii_strcasecmp instead of strcasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on class names to be a plain ASCII one, not to do weird things with "I" in Turkish locales, so g_ascii_strcasecmp() is better as it's explicit about that
--- qom/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
qom/object.c +2 -2
@@ -1193,8 +1193,8 @@ GSList *object_class_get_list(const char *implements_type,static gint object_class_cmp (gconstpointer a,gconstpointer b,gpointer d) { -return strcasecmp (object_class_get_name ((ObjectClass *)a), -object_class_get_name ((ObjectClass *)b)); +return g_ascii_strcasecmp (object_class_get_name ((ObjectClass *)a), +object_class_get_name ((ObjectClass *)b)); } GSList *object_class_get_list_sorted(const char *implements_type,
Signature · 1 line
2.52.0
PATCH v2 3/15 block: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on url prefix and it should be a plain ASCII one, not to do weird things with "I" in Turkish locales, so g_ascii_strcasecmp() is better as it's explicit about that
--- block/curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/curl.c +2 -2
@@ -871,8 +871,8 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, goto out; } -if ((!strncasecmp (s->url,"http://" ,strlen ("http://" )) - || !strncasecmp (s->url,"https://" ,strlen ("https://" ))) +if ((!g_ascii_strncasecmp (s->url,"http://" ,strlen ("http://" )) + || !g_ascii_strncasecmp (s->url,"https://" ,strlen ("https://" ))) && !s->accept_range) {pstrcpy (state->errmsg,CURL_ERROR_SIZE ,"Server does not support 'range' (byte ranges)." );
Signature · 1 line
2.52.0
Re: [PATCH v2 03/15] block: Use glib2 instead of strcasecmp/strncasecmp
Quoted 11 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on url prefix and it should be a plain ASCII one, not to do weird things with "I" in Turkish locales, sog_ascii_strcasecmp()is better as it's explicit about thatSigned-off-by Kostiantyn Kostiuk <[email protected]>---
thanks
-- PMM
PATCH v2 4/15 io: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison data in HTTP header and it should be a plain ASCII one, not to do weird things with "I" in Turkish locales, so g_ascii_strcasecmp() is better as it's explicit about that
--- io/channel-websock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
io/channel-websock.c +2 -2
@@ -457,7 +457,7 @@ static void qio_channel_websock_handshake_process(QIOChannelWebsock *ioc, connectionv =g_strsplit (connection,"," ,0 );for (i =0 ; connectionv !=NULL && connectionv[i] !=NULL ; i++) {g_strstrip (connectionv[i]); -if (strcasecmp (connectionv[i], +if (g_ascii_strcasecmp (connectionv[i],QIO_CHANNEL_WEBSOCK_CONNECTION_UPGRADE ) ==0 ) { upgraded = true; }
@@ -468,7 +468,7 @@ static void qio_channel_websock_handshake_process(QIOChannelWebsock *ioc, goto bad_request; } -if (strcasecmp (upgrade,QIO_CHANNEL_WEBSOCK_UPGRADE_WEBSOCKET ) !=0 ) { +if (g_ascii_strcasecmp (upgrade,QIO_CHANNEL_WEBSOCK_UPGRADE_WEBSOCKET ) !=0 ) {error_setg (errp,"Incorrect upgrade method '%s'" , upgrade); goto bad_request; }
Signature · 1 line
2.52.0
Re: [PATCH v2 04/15] io: Use glib2 instead of strcasecmp/strncasecmp
Quoted 10 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison data in HTTP header and it should be a plain ASCII one, not to do weird things with "I" in Turkish locales, sog_ascii_strcasecmp()is better as it's explicit about thatSigned-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
PATCH v2 5/15 hw/arm: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on boot names to be a plain ASCII one, not to do weird things with "I" in Turkish locales, so g_ascii_strcasecmp() is better as it's explicit about that
--- hw/arm/xilinx_zynq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/arm/xilinx_zynq.c +4 -4
@@ -186,13 +186,13 @@ static void zynq_set_boot_mode(Object *obj, const char *str,ZynqMachineState *m =ZYNQ_MACHINE (obj);uint8_t mode =0 ; -if (!strncasecmp (str,"qspi" ,4 )) { +if (!g_ascii_strncasecmp (str,"qspi" ,4 )) { mode =1 ; - }else if (!strncasecmp (str,"sd" ,2 )) { + }else if (!g_ascii_strncasecmp (str,"sd" ,2 )) { mode =5 ; - }else if (!strncasecmp (str,"nor" ,3 )) { + }else if (!g_ascii_strncasecmp (str,"nor" ,3 )) { mode =2 ; - }else if (!strncasecmp (str,"jtag" ,4 )) { + }else if (!g_ascii_strncasecmp (str,"jtag" ,4 )) { mode =0 ; }else {error_setg (errp,"%s boot mode not supported" , str);
Signature · 1 line
2.52.0
Re: [PATCH v2 05/15] hw/arm: Use glib2 instead of strcasecmp/strncasecmp
Quoted 37 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on boot names to be a plain ASCII one, not to do weird things with "I" in Turkish locales, sog_ascii_strcasecmp()is better as it's explicit about thatSigned-off-by Kostiantyn Kostiuk <[email protected]>--- hw/arm/xilinx_zynq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)hw/arm/xilinx_zynq.c +4
-5@@ -186,13 +186,13 @@ static void zynq_set_boot_mode(Object *obj, const char *str,ZynqMachineState *m =ZYNQ_MACHINE (obj);uint8_t mode =0 ; -if (!strncasecmp (str,"qspi" ,4 )) { +if (!g_ascii_strncasecmp (str,"qspi" ,4 )) { mode =1 ; - }else if (!strncasecmp (str,"sd" ,2 )) { + }else if (!g_ascii_strncasecmp (str,"sd" ,2 )) { mode =5 ; - }else if (!strncasecmp (str,"nor" ,3 )) { + }else if (!g_ascii_strncasecmp (str,"nor" ,3 )) { mode =2 ; - }else if (!strncasecmp (str,"jtag" ,4 )) { + }else if (!g_ascii_strncasecmp (str,"jtag" ,4 )) { mode =0 ; }else {error_setg (errp,"%s boot mode not supported" , str); --
Quoted 1 line
2.52.0
(I suspect this code really ought to be doing a strcasecmp, because why would we want "-machine boot-mode=sdXYZZY" to act like "-machine boot-mode=sd" ? But that's a separate bug.)
thanks
-- PMM
PATCH v2 6/15 target/sparc: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on boolean property value to be a plain ASCII one, not to do weird things with "I" in Turkish locales, so g_ascii_strcasecmp() is better as it's explicit about that
--- target/sparc/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
target/sparc/cpu.c +4 -4
@@ -174,10 +174,10 @@ static void sparc_cpu_parse_features(const char *typename, char *features,* TODO: remove minus-override-plus semantics after * warning for a few releases */ -if (!strcasecmp (val,"on" ) || - !strcasecmp (val,"off" ) || - !strcasecmp (val,"true" ) || - !strcasecmp (val,"false" )) { +if (!g_ascii_strcasecmp (val,"on" ) || + !g_ascii_strcasecmp (val,"off" ) || + !g_ascii_strcasecmp (val,"true" ) || + !g_ascii_strcasecmp (val,"false" )) {error_setg (errp,"Boolean properties in format %s=%s" " are not supported" , name, val);return ;
Signature · 1 line
2.52.0
Re: [PATCH v2 06/15] target/sparc: Use glib2 instead of strcasecmp/strncasecmp
Quoted 11 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
(2) we want the comparison on boolean property value to be a plain ASCII one, not to do weird things with "I" in Turkish locales, sog_ascii_strcasecmp()is better as it's explicit about thatSigned-off-by Kostiantyn Kostiuk <[email protected]>---
thanks
-- PMM
PATCH v2 7/15 target/riscv: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
--- target/riscv/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/monitor.c +2 -2
@@ -303,7 +303,7 @@ static bool reg_is_vreg(const char *name) }for (int i =0 ; i <32 ; i++) { -if (strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) { +if (g_ascii_strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) {return true; } }
@@ -358,7 +358,7 @@ int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)continue ; } -if (strcasecmp (csr_ops[csrno].name, name) !=0 ) { +if (g_ascii_strcasecmp (csr_ops[csrno].name, name) !=0 ) {continue ; }
Signature · 1 line
2.52.0
Re: [PATCH v2 07/15] target/riscv: Use glib2 instead of strcasecmp/strncasecmp
Quoted 7 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change hereSigned-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
Re: [PATCH v2 07/15] target/riscv: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukQuoted 4 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
Thanks,
Chao
Quoted 32 lines
Signed-off-by Kostiantyn Kostiuk <[email protected]>--- target/riscv/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/riscv/monitor.c +2
-2@@ -303,7 +303,7 @@ static bool reg_is_vreg(const char *name) }for (int i =0 ; i <32 ; i++) { -if (strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) { +if (g_ascii_strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) {return true; } }@@ -358,7 +358,7 @@ int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)continue ; } -if (strcasecmp (csr_ops[csrno].name, name) !=0 ) { +if (g_ascii_strcasecmp (csr_ops[csrno].name, name) !=0 ) {continue ; }Signature · 1 line
2.52.0
Re: [PATCH v2 07/15] target/riscv: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukQuoted 7 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change hereSigned-off-by Kostiantyn Kostiuk <[email protected]>
Alistair
Quoted 30 lines
--- target/riscv/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/riscv/monitor.c +2
-3@@ -303,7 +303,7 @@ static bool reg_is_vreg(const char *name) }for (int i =0 ; i <32 ; i++) { -if (strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) { +if (g_ascii_strcasecmp (name, riscv_rvv_regnames[i]) ==0 ) {return true; } }@@ -358,7 +358,7 @@ int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)continue ; } -if (strcasecmp (csr_ops[csrno].name, name) !=0 ) { +if (g_ascii_strcasecmp (csr_ops[csrno].name, name) !=0 ) {continue ; } --2.52.0
PATCH v2 8/15 target/ppc: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
--- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/kvm.c +1 -1
@@ -2653,7 +2653,7 @@ static int kvm_ppc_register_host_cpu_type(void)*/ dc =DEVICE_CLASS (ppc_cpu_get_family_class (pvr_pcc));for (i =0 ; ppc_cpu_aliases[i].alias !=NULL ; i++) { -if (strcasecmp (ppc_cpu_aliases[i].alias, dc->desc) ==0 ) { +if (g_ascii_strcasecmp (ppc_cpu_aliases[i].alias, dc->desc) ==0 ) {char *suffix; ppc_cpu_aliases[i].model =g_strdup (object_class_get_name (oc));
Signature · 1 line
2.52.0
Re: [PATCH v2 08/15] target/ppc: Use glib2 instead of strcasecmp/strncasecmp
Quoted 7 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change hereSigned-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
PATCH v2 9/15 target/xtensa: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
--- target/xtensa/xtensa-isa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/xtensa/xtensa-isa.c +2 -2
@@ -370,7 +370,7 @@ int xtensa_isa_name_compare(const void *v1, const void *v2)xtensa_lookup_entry *e1 = (xtensa_lookup_entry *)v1;xtensa_lookup_entry *e2 = (xtensa_lookup_entry *)v2; -return strcasecmp (e1->key, e2->key); +return g_ascii_strcasecmp (e1->key, e2->key); }
@@ -513,7 +513,7 @@ xtensa_format xtensa_format_lookup(xtensa_isa isa, const char *fmtname) }for (fmt =0 ; fmt < intisa->num_formats; fmt++) { -if (strcasecmp (fmtname, intisa->formats[fmt].name) ==0 ) { +if (g_ascii_strcasecmp (fmtname, intisa->formats[fmt].name) ==0 ) {return fmt; } }
Signature · 1 line
2.52.0
Re: [PATCH v2 09/15] target/xtensa: Use glib2 instead of strcasecmp/strncasecmp
Quoted 9 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change hereSigned-off-by Kostiantyn Kostiuk <[email protected]>--- target/xtensa/xtensa-isa.c | 4 ++--
thanks
-- PMM
PATCH v2 10/15 hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
In reply to Kostiantyn KostiukThis is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change here
--- hw/ppc/spapr_caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr_caps.c +1 -1
@@ -129,7 +129,7 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,return ; }for (i =0 ; i < cap->possible->num; i++) { -if (!strcasecmp (val, cap->possible->vals[i])) { +if (!g_ascii_strcasecmp (val, cap->possible->vals[i])) { spapr->cmd_line_caps[cap->index] = true; spapr->eff.caps[cap->index] = i;return ;
Signature · 1 line
2.52.0
Re: [PATCH v2 10/15] hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
Quoted 7 lines · Kostiantyn Kostiuk
This is a change in semantics.
g_ascii_strcasecmp()doesn't honour locale butstrcasecmp()does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual behaviour change hereSigned-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
PATCH v2 11/15 osdep: Remove unused strings.h
In reply to Kostiantyn KostiukWe don't use strcasecmp/strncasecmp anymore. Also, we don't use any other strings.h function. So this include is no more needed.
--- include/qemu/osdep.h | 1 - 1 file changed, 1 deletion(-)
include/qemu/osdep.h +0 -1
@@ -114,7 +114,6 @@ QEMU_EXTERN_C int daemon(int, int);#include <stdio.h> #include <string.h> -#include <strings.h> #include <inttypes.h> #include <limits.h> /* Put unistd.h before time.h as that triggers localtime_r/gmtime_r
Signature · 1 line
2.52.0
Re: [PATCH v2 11/15] osdep: Remove unused strings.h
Quoted 6 lines · Kostiantyn Kostiuk
We don't use strcasecmp/strncasecmp anymore. Also, we don't use any other
strings.hfunction. So this include is no more needed.Signed-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
PATCH v2 12/15 util: Remove unused dirent.h
In reply to Kostiantyn KostiukThis one is OK to drop, because the rewrite of path.c in commit f3a8bdc1d5b26 removed the uses of the dirent.h functions.
--- util/path.c | 1 - 1 file changed, 1 deletion(-)
util/path.c +0 -1
@@ -5,7 +5,6 @@*/ #include "qemu/osdep.h" #include <sys/param.h> -#include <dirent.h> #include "qemu/cutils.h" #include "qemu/path.h" #include "qemu/thread.h"
Signature · 1 line
2.52.0
Re: [PATCH v2 12/15] util: Remove unused dirent.h
Quoted 5 lines · Kostiantyn Kostiuk
This one is OK to drop, because the rewrite of
path.cin commitf3a8bdc1d5b26removed the uses of thedirent.hfunctions.Signed-off-by Kostiantyn Kostiuk <[email protected]>
thanks
-- PMM
PATCH v2 13/15 util: Remove unused sys/param.h
In reply to Kostiantyn KostiukWe dropped the use of PATH_MAX in commit f3a8bdc1d5b26 (which basically completely rewrote the path handling). Now we don't need any sys/param.h defines.
--- util/path.c | 1 - 1 file changed, 1 deletion(-)
util/path.c +0 -1
@@ -4,7 +4,6 @@The assumption is that this area does not change. */ #include "qemu/osdep.h" -#include <sys/param.h> #include "qemu/cutils.h" #include "qemu/path.h" #include "qemu/thread.h"
Signature · 1 line
2.52.0
Re: [PATCH v2 13/15] util: Remove unused sys/param.h
Quoted 7 lines · Kostiantyn Kostiuk
We dropped the use of
PATH_MAXin commitf3a8bdc1d5b26(which basically completely rewrote the path handling). Now we don't need anysys/param.hdefines.Reviewed-by Peter Maydell <[email protected]>Signed-off-by Kostiantyn Kostiuk <[email protected]>
(If you need to do a v3 for some reason you could merge this with the previous patch; but it's not worth respinning just to do that.)
thanks
-- PMM
PATCH v2 14/15 storage-daemon: use same link arguments as other tools
In reply to Kostiantyn KostiukFrom: Paolo Bonzini <[email protected]>
--- meson.build | 8 ++++---- storage-daemon/meson.build | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-)
meson.build +4 -4
@@ -4507,15 +4507,15 @@ if xkbcommon.found() endif if have_tools - link_args = enable_modules ? ['@block.syms'] : [] + tools_link_args = enable_modules ? ['@block.syms'] : [] qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep], - link_args: link_args, link_depends: block_syms, + link_args: tools_link_args, link_depends: block_syms, dependencies: [authz, block, crypto, io, qom, qemuutil], install: true) qemu_io = executable('qemu-io', files('qemu-io.c'), - link_args: link_args, link_depends: block_syms, + link_args: tools_link_args, link_depends: block_syms, dependencies: [block, qemuutil], install: true) qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'), - link_args: link_args, link_depends: block_syms, + link_args: tools_link_args, link_depends: block_syms, dependencies: [blockdev, qemuutil, selinux], install: true)
storage-daemon/meson.build +8 -8
@@ -1,14 +1,14 @@ +assert(have_tools) + qsd_ss = ss.source_set() qsd_ss.add(files('qemu-storage-daemon.c')) qsd_ss.add(blockdev, chardev, qmp, qom, qemuutil) subdir('qapi') -if have_tools - qsd_ss = qsd_ss.apply({}) - qsd = executable('qemu-storage-daemon', - qsd_ss.sources(), - link_args: '@block.syms', link_depends: block_syms, - dependencies: qsd_ss.dependencies(), - install: true) -endif +qsd_ss = qsd_ss.apply({}) +qsd = executable('qemu-storage-daemon', + qsd_ss.sources(), + link_args: tools_link_args, link_depends: block_syms, + dependencies: qsd_ss.dependencies(), + install: true)
Signature · 1 line
2.52.0
PATCH v2 15/15 meson: Don't require nm for non-modular builds
In reply to Kostiantyn KostiukIn the MSVC build environment, nm is missing; at the same time, scripts/undefsym.py exits with code 0 at the beginning for non-modular builds.
So, this change is harmless because it already didn't do anything in non-modular builds, but remove the additional tool requirements.
--- meson.build | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-)
meson.build +14 -11
@@ -3908,6 +3908,9 @@ modinfo_generate = find_program('scripts/modinfo-generate.py') modinfo_files = [] audio_modinfo_files = [] +block_syms = [] +qemu_syms = [] + block_mods = [] system_mods = [] emulator_modules = []
@@ -4023,18 +4026,18 @@ if enable_modules if emulator_modules.length() > 0 alias_target('modules', emulator_modules) endif -endif -nm = find_program('nm') -undefsym = find_program('scripts/undefsym.py') -block_syms = custom_target('block.syms', output: 'block.syms', - input: [libqemuutil, block_mods], - capture: true, - command: [undefsym, nm, '@INPUT@']) -qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', - input: [libqemuutil, system_mods], - capture: true, - command: [undefsym, nm, '@INPUT@']) + nm = find_program('nm') + undefsym = find_program('scripts/undefsym.py') + block_syms = custom_target('block.syms', output: 'block.syms', + input: [libqemuutil, block_mods], + capture: true, + command: [undefsym, nm, '@INPUT@']) + qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', + input: [libqemuutil, system_mods], + capture: true, + command: [undefsym, nm, '@INPUT@']) +endif authz_ss = authz_ss.apply({}) libauthz = static_library('authz', authz_ss.sources() + genh,
Signature · 1 line
2.52.0