qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prot


From: Blue Swirl
Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static
Date: Sun, 8 Mar 2009 17:36:15 +0200

On 3/8/09, Anthony Liguori <address@hidden> 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 <windows.h> 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 <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#include <sys/time.h>
#include <zlib.h>
before config-host.h line are now broken because of missing windows.h
include? Or is it just some header below that?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]