qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>, "Song Gao" <gaosong@loongson.cn>,
	"Bibo Mao" <maobibo@loongson.cn>,
	"Alex Williamson" <alex.williamson@redhat.com>
Subject: Re: [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
Date: Tue, 8 Jul 2025 22:53:13 +0200	[thread overview]
Message-ID: <37e9f347-f7ba-4ea6-93f8-879d8169012a@linaro.org> (raw)
In-Reply-To: <20250708085859.7885-4-philmd@linaro.org>

On 8/7/25 10:58, Philippe Mathieu-Daudé wrote:
> Commit f5fd677ae7c ("win32/socket: introduce qemu_socket_select()
> helper") included the "qemu/typedefs.h" header for the Error type,
> but files including "system/os-win32.h" should already include
> "qemu/osdep.h", and thus "qemu/typedefs.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/system/os-win32.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/system/os-win32.h b/include/system/os-win32.h
> index 3aa6cee4c23..662cfabc5e7 100644
> --- a/include/system/os-win32.h
> +++ b/include/system/os-win32.h
> @@ -29,7 +29,6 @@
>   #include <winsock2.h>
>   #include <windows.h>
>   #include <ws2tcpip.h>
> -#include "qemu/typedefs.h"

FTR, copying Peter's comment on v1:
http://lore.kernel.org/qemu-devel/CAFEAcA9rcJHBaeAqCM1BszrhzkE4=gxJkx9h62BVhEz9hB7OMA@mail.gmail.com

 > This one's tricky -- osdep.h includes system/os-win32.h
 > *before* it includes typedefs.h. If you want to remove this
 > include I think you need to move the include of typedefs.h
 > a bit further up in osdep.h (taking care that it's still
 > wrapped in an "extern C").
 >
 > (Or we could declare the functions in os-win32.h which
 > use the Error type somewhere else. That header I think is
 > intended to be "Windows specifics and compatibility wrappers
 > that everywhere needs to have sorted out", not "this
 > function happens to only be needed on Windows": a lot
 > of the functions declared in it are only used in a
 > handful of files and don't need to be declared to every
 > source file in the project. But that's a bit more effort.)



  reply	other threads:[~2025-07-08 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  8:58 [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
2025-07-08  8:58 ` [PATCH v2 1/3] hw/intc/loongarch_extioi: " Philippe Mathieu-Daudé
2025-07-08  8:58 ` [PATCH v2 2/3] hw/vfio/vfio-migration: " Philippe Mathieu-Daudé
2025-07-15  5:39   ` Cédric Le Goater
2025-07-08  8:58 ` [PATCH v2 3/3] system/os-win32: " Philippe Mathieu-Daudé
2025-07-08 20:53   ` Philippe Mathieu-Daudé [this message]
2025-07-08 22:13     ` Philippe Mathieu-Daudé

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=37e9f347-f7ba-4ea6-93f8-879d8169012a@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=maobibo@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).