From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHvGO-0002tV-36 for qemu-devel@nongnu.org; Mon, 24 Feb 2014 08:08:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHvGH-0004m7-VC for qemu-devel@nongnu.org; Mon, 24 Feb 2014 08:08:03 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49024 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHvGH-0004lv-Os for qemu-devel@nongnu.org; Mon, 24 Feb 2014 08:07:57 -0500 Message-ID: <530B4429.1020307@suse.de> Date: Mon, 24 Feb 2014 14:07:53 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1393174935-11750-1-git-send-email-sw@weilnetz.de> <1393174935-11750-10-git-send-email-sw@weilnetz.de> In-Reply-To: <1393174935-11750-10-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Maydell , Anthony Liguori , Stefan Hajnoczi Am 23.02.2014 18:02, schrieb Stefan Weil: > These header files are used by most QEMU source files. If they > depend on windows.h, all those source files do so, too. >=20 > All Windows specific data types which are replaced use identical > definitions for the 32 and 64 bit Windows APIs. HANDLE and LONG > can be directly replaced by void * and long. CRITICAL_SECTION > is replaced by a new struct of the same size. >=20 > Add an explicit dependency on sysemu/os-winapi.h for some files which n= eed it. > These sources use the Windows API (see comment after include statement) > and no longer get windows.h indirectly from other header files. >=20 > A workaround which was added in the previous patch is no longer needed. >=20 > Now 175 *.o files remain which still depend on windows.h. >=20 > Cc: Anthony Liguori > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Signed-off-by: Stefan Weil [...] > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > index 367eda1..6ea48c4 100644 > --- a/include/qom/cpu.h > +++ b/include/qom/cpu.h First of all, why was I not CC'ed on this change? File is listed under "CPU" subsystem in MAINTAINERS. Patches not getting sufficient review is one risk, causing merge conflicts another. People should be aware of changes you make in their files, even if "just" Windows-related. > @@ -170,7 +170,7 @@ struct CPUState { > =20 > struct QemuThread *thread; > #ifdef _WIN32 > - HANDLE hThread; > + void *hThread; > #endif > int thread_id; > uint32_t host_tid; I had moved the field unchanged from another header, I believe. I don't think this is a good change (assuming the Windows API is still using this type and not void*), especially since it's #ifdef'ed anyway. And I don't understand why reducing the number of files dependent on windows.h is a good thing either. Your cover letter does not explain. We've not been trying to reduce dependencies on glib either, nor is there precedence for replacing other pointer types elsewhere (e.g. qemu_irq). Wherever possible, we've been using the most precise pointer type to let the compiler or static analysis tools help us catch mismatche= s. Is all this just to speed up rebuilds after MinGW updates? Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg