From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-trivial@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Kostiantyn Kostiuk" <kkostiuk@redhat.com>
Subject: Re: [PATCH] Replace CONFIG_WIN32 with CONFIG_WIN64
Date: Thu, 22 Jan 2026 09:28:36 +0000 [thread overview]
Message-ID: <aXHtxBfuIRsJ3P_M@redhat.com> (raw)
In-Reply-To: <20260122090352.9901-1-thuth@redhat.com>
On Thu, Jan 22, 2026 at 10:03:52AM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> We stopped supported 32-bit Windows hosts a while ago already, so
> let's rename CONFIG_WIN32 to CONFIG_WIN64 now to make it clear
> that this switch is not about 32-bit Windows anymore.
>
> The patch has been created with a simple sed statement:
>
> sed -i s/CONFIG_WIN32/CONFIG_WIN64/g $(grep -rl CONFIG_WIN32 *)
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> meson.build | 2 +-
> qapi/char.json | 4 +--
> qapi/misc.json | 2 +-
> qga/qapi-schema.json | 76 +++++++++++++++++++++----------------------
> include/qemu/futex.h | 2 +-
> include/qemu/xattr.h | 2 +-
> hw/usb/host-libusb.c | 18 +++++-----
> io/channel-watch.c | 10 +++---
> ui/gtk.c | 2 +-
> util/cacheflush.c | 4 +--
> util/sys_membarrier.c | 2 +-
> scripts/checkpatch.pl | 2 +-
> 12 files changed, 63 insertions(+), 63 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index a84f14258b0..01b9a5c22ce 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2422,7 +2422,7 @@ config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
> config_host_data.set('CONFIG_LIBUDEV', libudev.found())
> config_host_data.set('CONFIG_LINUX', host_os == 'linux')
> config_host_data.set('CONFIG_POSIX', host_os != 'windows')
> -config_host_data.set('CONFIG_WIN32', host_os == 'windows')
> +config_host_data.set('CONFIG_WIN64', host_os == 'windows')
While relevant to qapi file conditions, from a C code pov all of these
are redundant as the compiler has all these facts built-in
#ifdef CONFIG_LINUX => #ifdef __linux__
#ifdef CONFIG_POSIX => #if !defined(_WIN32)
#ifdef CONFIG_WIN32 => #ifdef _WIN32
NB, _WIN32 *is* set on 64-bit Windows platforms too, so using
_WIN64 is only needed if you have a code path that is exclusively
64-bit only, so there's little need for us to use _WIN64.
And of course we are horribly inconsistent in what we use:
$ git grep -E '#if.*_WIN32' | wc -l
284
$ git grep -E '#if.*__linux__' | wc -l
90
$ git grep -E '#if.*CONFIG_LINUX' | wc -l
142
$ git grep -E '#if.*CONFIG_WIN' | wc -l
16
I'm inclined to posion all these from the C source though, and only
these them from non-C locations.
Also IMHO CONFIG_WIN or CONFIG_WINDOWS is preferrable - we don't
add '32' or '64' suffixes to CONFIG_LINUX or CONFIG_POSIX, so I don't
see a reason to keep doing it for Windows.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2026-01-22 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 9:03 [PATCH] Replace CONFIG_WIN32 with CONFIG_WIN64 Thomas Huth
2026-01-22 9:07 ` Philippe Mathieu-Daudé
2026-01-22 9:28 ` Daniel P. Berrangé [this message]
2026-01-22 9:37 ` Peter Maydell
2026-01-22 9:43 ` Daniel P. Berrangé
2026-01-22 9:51 ` Peter Maydell
2026-01-22 10:11 ` Marc-André Lureau
2026-01-22 10:20 ` Thomas Huth
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=aXHtxBfuIRsJ3P_M@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--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 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.