From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>,
Thomas Huth <thuth@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
Konstantin Kostiuk <kkostiuk@redhat.com>,
Stefan Weil <sw@weilnetz.de>, Kevin Wolf <kwolf@redhat.com>,
Darren Kenny <darren.kenny@oracle.com>,
Laurent Vivier <lvivier@redhat.com>,
Michael Roth <michael.roth@amd.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Qiuhao Li <Qiuhao.Li@outlook.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-block <qemu-block@nongnu.org>
Subject: Re: [PATCH v2 03/15] tests: make libqmp buildable for win32
Date: Mon, 16 May 2022 07:57:09 +0200 [thread overview]
Message-ID: <8735haggui.fsf@pond.sub.org> (raw)
In-Reply-To: <CAMxuvayhwawMwxGk7Rc3=hsgn4q=kLATsFtbB3jAQbDKxCJoZA@mail.gmail.com> ("Marc-André Lureau"'s message of "Thu, 5 May 2022 15:08:15 +0400")
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Thu, May 5, 2022 at 2:52 PM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> marcandre.lureau@redhat.com writes:
>>
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > Reviewed-by: Thomas Huth <thuth@redhat.com>
>> > ---
>> > tests/qtest/libqmp.h | 2 ++
>> > tests/qtest/libqmp.c | 35 +++++++++++++++++++++++++++++------
>> > 2 files changed, 31 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/tests/qtest/libqmp.h b/tests/qtest/libqmp.h
>> > index 94aa97328a17..772f18b73ba3 100644
>> > --- a/tests/qtest/libqmp.h
>> > +++ b/tests/qtest/libqmp.h
>> > @@ -20,8 +20,10 @@
>> > #include "qapi/qmp/qdict.h"
>> >
>> > QDict *qmp_fd_receive(int fd);
>> > +#ifndef G_OS_WIN32
>>
>> What's the difference between G_OS_WIN32 and _WIN32?
>>
>> We have 10 of the former, but >250 of the latter. If they are
>> effectively the same, we should pick one and stick to it.
>
> There are some subtle differences when compiling for cygwin, in which
> case G_OS_WIN32 is not defined.
>
> I usually pick G_OS_{UNIX,WIN32} defines, mostly for consistency, but
> in many situation _WIN32/WIN32 is fine.
>
> (and we also have CONFIG_WIN32)
I really think we should use one and only one unless there are
differences that *require* more.
Of the three, _WIN32 predominates (numbers appended). Please use _WIN32
unless you can show a need for something else.
$ git-grep -cw G_OS_WIN32
qga/commands.c:5
ui/gtk.c:5
$ git-grep -cw CONFIG_WIN32 master
master:Makefile:1
master:block/meson.build:1
master:chardev/meson.build:1
master:configure:1
master:hw/usb/host-libusb.c:9
master:io/channel-watch.c:5
master:meson.build:1
master:net/meson.build:1
master:qga/meson.build:1
master:scripts/checkpatch.pl:1
master:target/i386/hax/hax-i386.h:2
master:target/i386/hax/meson.build:1
master:ui/gtk.c:1
master:ui/meson.build:2
master:ui/sdl2.c:1
master:util/meson.build:5
master:util/sys_membarrier.c:1
$ git-grep -cw CONFIG_WIN32 master
master:Makefile:1
master:block/meson.build:1
master:chardev/meson.build:1
master:configure:1
master:hw/usb/host-libusb.c:9
master:io/channel-watch.c:5
master:meson.build:1
master:net/meson.build:1
master:qga/meson.build:1
master:scripts/checkpatch.pl:1
master:target/i386/hax/hax-i386.h:2
master:target/i386/hax/meson.build:1
master:ui/gtk.c:1
master:ui/meson.build:2
master:ui/sdl2.c:1
master:util/meson.build:5
master:util/sys_membarrier.c:1
$ git-grep -cw _WIN32 master
master:accel/tcg/cpu-exec.c:1
master:accel/tcg/tcg-accel-ops-mttcg.c:1
master:accel/tcg/tcg-accel-ops-rr.c:1
master:audio/sdlaudio.c:3
master:block.c:6
master:block/nfs.c:5
master:block/vvfat.c:1
master:chardev/char-file.c:3
master:chardev/char-pipe.c:4
master:chardev/char-serial.c:4
master:chardev/char-socket.c:1
master:chardev/char-stdio.c:5
master:configure:1
master:contrib/elf2dmp/kdbg.h:1
master:contrib/elf2dmp/pdb.h:1
master:contrib/elf2dmp/pe.h:1
master:crypto/pbkdf.c:2
master:crypto/random-platform.c:3
master:gdbstub.c:2
master:include/block/block_int-common.h:1
master:include/block/raw-aio.h:1
master:include/exec/ram_addr.h:2
master:include/hw/core/cpu.h:1
master:include/io/channel.h:1
master:include/qapi/error.h:1
master:include/qemu/compiler.h:2
master:include/qemu/event_notifier.h:2
master:include/qemu/main-loop.h:1
master:include/qemu/osdep.h:6
master:include/qemu/qemu-plugin.h:1
master:include/qemu/sockets.h:2
master:include/qemu/thread.h:1
master:include/qemu/timer.h:1
master:io/channel.c:1
master:monitor/misc.c:1
master:nbd/nbd-internal.h:1
master:net/net.c:1
master:qemu-io.c:2
master:qemu-options.hx:6
master:qga/guest-agent-core.h:1
master:qga/main.c:21
master:scripts/cocci-macro-file.h:1
master:scripts/codeconverter/codeconverter/test_regexps.py:1
master:softmmu/cpus.c:2
master:softmmu/physmem.c:4
master:softmmu/vl.c:3
master:stubs/is-daemonized.c:1
master:subprojects/libvhost-user/libvhost-user.h:1
master:target/i386/hax/hax-accel-ops.c:1
master:target/i386/whpx/whpx-accel-ops.c:1
master:target/m68k/m68k-semi.c:1
master:target/mips/tcg/sysemu/mips-semi.c:4
master:target/nios2/nios2-semi.c:1
master:tcg/region.c:1
master:tests/qtest/virtio-net-test.c:2
master:tests/unit/test-char.c:6
master:tests/unit/test-crypto-block.c:2
master:tests/unit/test-crypto-pbkdf.c:2
master:tests/unit/test-io-channel-file.c:4
master:tests/unit/test-io-channel-socket.c:4
master:tests/unit/test-iov.c:1
master:tests/unit/test-replication.c:3
master:tests/unit/test-util-sockets.c:2
master:trace/simple.c:3
master:ui/curses.c:3
master:util/cacheinfo.c:1
master:util/error.c:1
master:util/main-loop.c:4
master:util/osdep.c:8
master:util/qemu-sockets.c:2
master:util/qemu-timer-common.c:1
master:util/systemd.c:2
next prev parent reply other threads:[~2022-05-16 6:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 8:14 [PATCH v2 00/15] Misc cleanups marcandre.lureau
2022-05-05 8:14 ` [PATCH v2 01/15] include: move qemu_*_exec_dir() to cutils marcandre.lureau
2022-05-05 8:14 ` [PATCH v2 02/15] util/win32: simplify qemu_get_local_state_dir() marcandre.lureau
2022-05-05 8:14 ` [PATCH v2 03/15] tests: make libqmp buildable for win32 marcandre.lureau
2022-05-05 10:52 ` Markus Armbruster
2022-05-05 11:08 ` Marc-André Lureau
2022-05-16 5:57 ` Markus Armbruster [this message]
2022-05-05 8:14 ` [PATCH v2 04/15] include: adjust header guards after renaming marcandre.lureau
2022-05-05 10:58 ` Markus Armbruster
2022-05-05 8:14 ` [PATCH v2 05/15] qga: flatten safe_open_or_create() marcandre.lureau
2022-05-05 11:19 ` Markus Armbruster
2022-05-05 11:27 ` Marc-André Lureau
2022-05-05 8:14 ` [PATCH v2 06/15] osdep: export qemu_open_cloexec() marcandre.lureau
2022-05-05 8:14 ` [PATCH v2 07/15] qga: use qemu_open_cloexec() for safe_open_or_create() marcandre.lureau
2022-05-05 11:32 ` Markus Armbruster
2022-05-13 10:02 ` Marc-André Lureau
2022-05-05 8:14 ` [PATCH v2 08/15] qga: throw an Error in ga_channel_open() marcandre.lureau
2022-05-05 11:39 ` Markus Armbruster
2022-05-05 11:49 ` Marc-André Lureau
2022-05-05 8:14 ` [PATCH v2 09/15] qga: replace qemu_open_old() with qemu_open_cloexec() marcandre.lureau
2022-05-05 11:42 ` Markus Armbruster
2022-05-05 11:54 ` Marc-André Lureau
2022-05-05 8:14 ` [PATCH v2 10/15] test/qga: use G_TEST_DIR to locate os-release test file marcandre.lureau
2022-05-05 8:14 ` [PATCH v2 11/15] qga/wixl: prefer variables over environment marcandre.lureau
2022-05-05 8:25 ` Konstantin Kostiuk
2022-05-05 8:14 ` [PATCH v2 12/15] qga/wixl: require Mingw_bin marcandre.lureau
2022-05-05 8:26 ` Konstantin Kostiuk
2022-05-05 8:14 ` [PATCH v2 13/15] qga/wixl: simplify some pre-processing marcandre.lureau
2022-05-05 8:26 ` Konstantin Kostiuk
2022-05-05 8:14 ` [PATCH v2 14/15] qga/wixl: replace QEMU_GA_MSI_MINGW_BIN_PATH with glib bindir marcandre.lureau
2022-05-05 8:28 ` Konstantin Kostiuk
2022-05-05 8:14 ` [PATCH v2 15/15] test/qga: use g_auto wherever sensible marcandre.lureau
2022-05-05 11:47 ` Markus Armbruster
2022-05-05 11:51 ` Marc-André Lureau
2022-05-05 13:39 ` Markus Armbruster
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=8735haggui.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=Qiuhao.Li@outlook.com \
--cc=alxndr@bu.edu \
--cc=bsd@redhat.com \
--cc=darren.kenny@oracle.com \
--cc=hreitz@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
--cc=thuth@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 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).