From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgLRN-00009P-NX for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:01:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgLRJ-00007y-9W for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:01:23 -0400 Received: from [199.232.76.173] (port=51655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgLRI-00007q-T5 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:01:20 -0400 Received: from mail-ew0-f173.google.com ([209.85.219.173]:60791) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgLRI-0007Ft-27 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:01:20 -0400 Received: by ewy21 with SMTP id 21so525174ewy.34 for ; Sun, 08 Mar 2009 09:01:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <49B3E265.1040205@codemonkey.ws> Date: Sun, 8 Mar 2009 17:01:17 +0100 Message-ID: <5b31733c0903080901s40b6237bo5236e6ea36559462@mail.gmail.com> Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static From: Filip Navara Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, Mar 8, 2009 at 4:36 PM, Blue Swirl wrote: > On 3/8/09, Anthony Liguori wrote: >> Blue Swirl wrote: >> >> > Revision: 6736 >> > >> http://svn.sv.gnu.org/viewvc/?view=3Drev&root=3Dqemu&revision=3D6736 >> > Author: =A0 blueswir1 >> > Date: =A0 =A0 2009-03-07 15:32:56 +0000 (Sat, 07 Mar 2009) >> > Log Message: >> > ----------- >> > Sparse fixes: NULL use, header order, ANSI prototypes, static >> > >> > Fix Sparse warnings: >> > =A0* use NULL instead of plain 0 >> > =A0* rearrange header include order to avoid redefining types accident= ally >> > =A0* ANSIfy SLIRP >> > =A0* avoid "restrict" keyword >> > =A0* add static >> > >> > >> >> =A0This broke the Windows build. =A0The reason is that you moved all sys= tem >> headers to be included before any QEMU headers. =A0While I agree with th= is in >> principle, Windows headers are sloppy and don't include their dependenci= es. >> Right now, we rely on qemu-common.h being included in the top in order t= o >> get #include every where. >> >> =A0To complicate matters further, we define some special versioning magi= c to >> get windows IPv6 support working. =A0I don't want to add that full blob = to >> every .c file so it makes sense to use a qemu include file (like >> qemu-common.h). =A0That defeats that purpose of your refactoring though = so I >> wanted to see what you thought about it. > > Taking vl.c as an example, do you mean that even these headers: > #include > #include > #include > #include > #include > #include > #include > before config-host.h line are now broken because of missing windows.h > include? Or is it just some header below that? Only mmsystem.h as far as I can see... which is also needlessly included in many files (savecm.c, net.c). F.