From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgLfw-00010q-IR for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:16:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgLfv-0000zl-O3 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:16:28 -0400 Received: from [199.232.76.173] (port=39213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgLfv-0000zP-IN for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:16:27 -0400 Received: from yw-out-1718.google.com ([74.125.46.157]:19490) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgLfv-0001Hq-1J for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:16:27 -0400 Received: by yw-out-1718.google.com with SMTP id 6so528491ywa.82 for ; Sun, 08 Mar 2009 09:16:26 -0700 (PDT) Message-ID: <49B3EF58.701@codemonkey.ws> Date: Sun, 08 Mar 2009 11:16:24 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static References: <49B3E265.1040205@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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: Blue Swirl Cc: qemu-devel@nongnu.org Blue Swirl wrote: > 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? > Just windows headers. For example, from net.c: > #include > #include > #include > #include > #include > #include > #include > > /* Needed early for HOST_BSD etc. */ > #include "config-host.h" > > #ifndef _WIN32 > #include > #include > #include > #include > #include > #include > #include > #include > #include > #ifdef __NetBSD__ > #include > #endif > #ifdef __linux__ > #include > #endif > #include > #include > #include > #include > #ifdef HOST_BSD > #include > #if defined(__FreeBSD__) || defined(__DragonFly__) > #include > #else > #include > #endif > #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) > #include > #else > #ifdef __linux__ > #include > #include > #include > > /* For the benefit of older linux systems which don't supply it, > we use a local copy of hpet.h. */ > /* #include */ > #include "hpet.h" > > #include > #include > #endif > #ifdef __sun__ > #include > #include > #include > #include > #include > #include > #include > #include // must come after ip.h > #include > #include > #include > #include > #include > #endif > #endif > #endif > > #if defined(__OpenBSD__) > #include > #endif > > #if defined(CONFIG_VDE) > #include > #endif > > #ifdef _WIN32 > #include > #include > #include > #define getopt_long_only getopt_long > #define memalign(align, size) malloc(size) > #endif mmsystem.h needs windows.h to be included first. We need to get that include from qemu-common.h. I see three options: 1) include qemu-common.h at the top of every file as we were previously 2) split out a qemu-win32.h or something like that that just contained the windows headers included as we need them 3) explicitly include and use -D CFLAGS to set things up as we need it. I guess #3 looks the best to me. Regards, Anthony Liguori