From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgL35-0001Dk-7s for qemu-devel@nongnu.org; Sun, 08 Mar 2009 11:36:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgL33-0001C2-Mm for qemu-devel@nongnu.org; Sun, 08 Mar 2009 11:36:18 -0400 Received: from [199.232.76.173] (port=60306 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgL33-0001Bm-HU for qemu-devel@nongnu.org; Sun, 08 Mar 2009 11:36:17 -0400 Received: from mail-fx0-f175.google.com ([209.85.220.175]:47533) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgL33-000417-1R for qemu-devel@nongnu.org; Sun, 08 Mar 2009 11:36:17 -0400 Received: by fxm23 with SMTP id 23so1087470fxm.34 for ; Sun, 08 Mar 2009 08:36:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <49B3E265.1040205@codemonkey.ws> References: <49B3E265.1040205@codemonkey.ws> Date: Sun, 8 Mar 2009 17:36:15 +0200 Message-ID: Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 3/8/09, Anthony Liguori wrote: > Blue Swirl wrote: > > > Revision: 6736 > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6736 > > Author: blueswir1 > > Date: 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: > > * use NULL instead of plain 0 > > * rearrange header include order to avoid redefining types accidentally > > * ANSIfy SLIRP > > * avoid "restrict" keyword > > * add static > > > > > > This broke the Windows build. The reason is that you moved all system > headers to be included before any QEMU headers. While I agree with this in > principle, Windows headers are sloppy and don't include their dependencies. > Right now, we rely on qemu-common.h being included in the top in order to > get #include every where. > > To complicate matters further, we define some special versioning magic to > get windows IPv6 support working. I 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). That 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?