Received: from eggs.gnu.org ([2001:4830:134:3::10]:54951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMw1I-0002x6-Lk for qemu-devel@nongnu.org; Mon, 10 Mar 2014 04:57:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMw1H-0008Gm-69 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 04:57:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMw1G-0008GW-UZ for qemu-devel@nongnu.org; Mon, 10 Mar 2014 04:57:11 -0400 From: Markus Armbruster References: <1394230667-17037-1-git-send-email-sw@weilnetz.de> <1394230667-17037-2-git-send-email-sw@weilnetz.de> Date: Mon, 10 Mar 2014 09:56:04 +0100 In-Reply-To: <1394230667-17037-2-git-send-email-sw@weilnetz.de> (Stefan Weil's message of "Fri, 7 Mar 2014 23:17:43 +0100") Message-ID: <871tyah1p7.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 1/5] w32: Add and use intermediate include file for windows.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: kwolf@redhat.com, peter.maydell@linaro.org, Anthony Liguori , Jan Kiszka , qemu-devel@nongnu.org, Gerd Hoffmann , stefanha@redhat.com, pbonzini@redhat.com Stefan Weil writes: > Including windows.h from the new file include/qemu/winapi.h allows > better tracking of the files which depend on the Windows API. > > 1864 *.o files depend on windows.h in a typical build, only 88 *.o files > don't. > > The windows.h specific macro WIN32_LEAN_AND_MEAN is now defined in the new > file and no longer part of the QEMU_CFLAGS. A hack in ui/sdl.c can be > removed after this change. > > WINVER is still needed for all compilations with MinGW, so it cannot be > defined in the new file. Replace its numeric value by a symbolic value to > show which API is requested. [...] > diff --git a/block/raw-win32.c b/block/raw-win32.c > index ae1c8e6..95b27a5 100644 > --- a/block/raw-win32.c > +++ b/block/raw-win32.c > @@ -23,13 +23,13 @@ > */ > #include "qemu-common.h" > #include "qemu/timer.h" > +#include "qemu/winapi.h" /* HANDLE (in raw-aio.h) */ Such comments get out of date real fast. I treat them as noise. If raw-aio.h needs stuff from winapi.h, why doesn't raw-aio.h include it? > #include "block/block_int.h" > #include "qemu/module.h" > #include "raw-aio.h" > #include "trace.h" > #include "block/thread-pool.h" > #include "qemu/iov.h" > -#include > #include > > #define FTYPE_FILE 0 [...]