Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgLqA-0000Or-2P for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:27:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgLq9-0000OT-Hg for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:27:01 -0400 Received: from [199.232.76.173] (port=43608 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgLq9-0000OO-Bq for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:27:01 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44321 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LgLq8-0002vp-TK for qemu-devel@nongnu.org; Sun, 08 Mar 2009 12:27:01 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LgLq8-0007qN-5H for qemu-devel@nongnu.org; Sun, 08 Mar 2009 16:27:00 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LgLq7-0007qJ-N4 for qemu-devel@nongnu.org; Sun, 08 Mar 2009 16:27:00 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Sun, 08 Mar 2009 16:26:59 +0000 Subject: [Qemu-devel] [6783] Fix windows build and clean up use of 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 Revision: 6783 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6783 Author: aliguori Date: 2009-03-08 16:26:59 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Fix windows build and clean up use of We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so let's do it in OS_CFLAGS. Then, we can pepper in windows.h includes where using #includes that require it. Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/block-raw-win32.c trunk/block.c trunk/configure trunk/kqemu.c trunk/net.c trunk/osdep.c trunk/qemu-common.h trunk/qemu-img.c trunk/qemu_socket.h trunk/savevm.c trunk/slirp/slirp.h trunk/sysemu.h trunk/tap-win32.c trunk/vl.c Modified: trunk/block-raw-win32.c =================================================================== --- trunk/block-raw-win32.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/block-raw-win32.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -25,6 +25,7 @@ #include "qemu-timer.h" #include "block_int.h" #include +#include #include //#define WIN32_AIO Modified: trunk/block.c =================================================================== --- trunk/block.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/block.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -40,6 +40,10 @@ #endif #endif +#ifdef _WIN32 +#include +#endif + #define SECTOR_BITS 9 #define SECTOR_SIZE (1 << SECTOR_BITS) Modified: trunk/configure =================================================================== --- trunk/configure 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/configure 2009-03-08 16:26:59 UTC (rev 6783) @@ -590,6 +590,7 @@ oss="no" linux_user="no" bsd_user="no" + OS_CFLAGS="$OS_CFLAGS -DWIN32_LEAN_AND_MEAN -DWINVER=0x501" fi if test ! -x "$(which cgcc 2>/dev/null)"; then Modified: trunk/kqemu.c =================================================================== --- trunk/kqemu.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/kqemu.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -19,7 +19,6 @@ */ #include "config.h" #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN #include #include #else Modified: trunk/net.c =================================================================== --- trunk/net.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/net.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -102,6 +102,7 @@ #endif #ifdef _WIN32 +#include #include #include #include Modified: trunk/osdep.c =================================================================== --- trunk/osdep.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/osdep.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -37,7 +37,6 @@ #include "config-host.h" #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN #include #elif defined(HOST_BSD) #include Modified: trunk/qemu-common.h =================================================================== --- trunk/qemu-common.h 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/qemu-common.h 2009-03-08 16:26:59 UTC (rev 6783) @@ -2,12 +2,6 @@ #ifndef QEMU_COMMON_H #define QEMU_COMMON_H -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#define WINVER 0x0501 /* needed for ipv6 bits */ -#include -#endif - #define QEMU_NORETURN __attribute__ ((__noreturn__)) /* Hack around the mess dyngen-exec.h causes: We need QEMU_NORETURN in files that Modified: trunk/qemu-img.c =================================================================== --- trunk/qemu-img.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/qemu-img.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -27,7 +27,6 @@ #include #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN #include #endif Modified: trunk/qemu_socket.h =================================================================== --- trunk/qemu_socket.h 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/qemu_socket.h 2009-03-08 16:26:59 UTC (rev 6783) @@ -3,8 +3,6 @@ #define QEMU_SOCKET_H #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#define WINVER 0x0501 /* needed for ipv6 bits */ #include #include #include Modified: trunk/savevm.c =================================================================== --- trunk/savevm.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/savevm.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -71,6 +71,7 @@ #endif #ifdef _WIN32 +#include #include #include #include Modified: trunk/slirp/slirp.h =================================================================== --- trunk/slirp/slirp.h 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/slirp/slirp.h 2009-03-08 16:26:59 UTC (rev 6783) @@ -29,7 +29,6 @@ typedef uint64_t u_int64_t; typedef char *caddr_t; -#define WIN32_LEAN_AND_MEAN # include # include # include Modified: trunk/sysemu.h =================================================================== --- trunk/sysemu.h 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/sysemu.h 2009-03-08 16:26:59 UTC (rev 6783) @@ -4,6 +4,10 @@ #include "qemu-common.h" +#ifdef _WIN32 +#include +#endif + /* vl.c */ extern const char *bios_name; extern const char *bios_dir; Modified: trunk/tap-win32.c =================================================================== --- trunk/tap-win32.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/tap-win32.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -30,7 +30,6 @@ #include "net.h" #include "sysemu.h" #include -#define WIN32_LEAN_AND_MEAN #include /* NOTE: PCIBus is redefined in winddk.h */ Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2009-03-08 15:58:00 UTC (rev 6782) +++ trunk/vl.c 2009-03-08 16:26:59 UTC (rev 6783) @@ -103,6 +103,7 @@ #endif #ifdef _WIN32 +#include #include #include #include