Commit 4fddf62a74c26f8da3c5ee61600e4d61052b0610

Authored by ths
1 parent f60d39bc

Use WIN32_LEAN_AND_MEAN, by Stefan Weil.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3832 c046a42c-6fe2-441c-8c8c-71466251a162
audio/dsoundaudio.c
@@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
32 #define AUDIO_CAP "dsound" 32 #define AUDIO_CAP "dsound"
33 #include "audio_int.h" 33 #include "audio_int.h"
34 34
  35 +#define WIN32_LEAN_AND_MEAN
35 #include <windows.h> 36 #include <windows.h>
  37 +#include <mmsystem.h>
36 #include <objbase.h> 38 #include <objbase.h>
37 #include <dsound.h> 39 #include <dsound.h>
38 40
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 */ 19 */
20 #include "config.h" 20 #include "config.h"
21 #ifdef _WIN32 21 #ifdef _WIN32
  22 +#define WIN32_LEAN_AND_MEAN
22 #include <windows.h> 23 #include <windows.h>
23 #else 24 #else
24 #include <sys/types.h> 25 #include <sys/types.h>
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 */ 19 */
20 #include "config.h" 20 #include "config.h"
21 #ifdef _WIN32 21 #ifdef _WIN32
  22 +#define WIN32_LEAN_AND_MEAN
22 #include <windows.h> 23 #include <windows.h>
23 #include <winioctl.h> 24 #include <winioctl.h>
24 #else 25 #else
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
37 #include "sysemu.h" 37 #include "sysemu.h"
38 38
39 #ifdef _WIN32 39 #ifdef _WIN32
  40 +#define WIN32_LEAN_AND_MEAN
40 #include <windows.h> 41 #include <windows.h>
41 #elif defined(_BSD) 42 #elif defined(_BSD)
42 #include <stdlib.h> 43 #include <stdlib.h>
qemu-common.h
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 #endif 28 #endif
29 29
30 #ifdef _WIN32 30 #ifdef _WIN32
  31 +#define WIN32_LEAN_AND_MEAN
31 #include <windows.h> 32 #include <windows.h>
32 #define fsync _commit 33 #define fsync _commit
33 #define lseek _lseeki64 34 #define lseek _lseeki64
qemu-img.c
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 #include <assert.h> 26 #include <assert.h>
27 27
28 #ifdef _WIN32 28 #ifdef _WIN32
  29 +#define WIN32_LEAN_AND_MEAN
29 #include <windows.h> 30 #include <windows.h>
30 #endif 31 #endif
31 32
qemu_socket.h
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 #define QEMU_SOCKET_H 3 #define QEMU_SOCKET_H
4 4
5 #ifdef _WIN32 5 #ifdef _WIN32
6 - 6 +#define WIN32_LEAN_AND_MEAN
7 #include <windows.h> 7 #include <windows.h>
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #include <ws2tcpip.h> 9 #include <ws2tcpip.h>
slirp/slirp.h
@@ -29,6 +29,7 @@ typedef uint32_t u_int32_t; @@ -29,6 +29,7 @@ typedef uint32_t u_int32_t;
29 typedef uint64_t u_int64_t; 29 typedef uint64_t u_int64_t;
30 typedef char *caddr_t; 30 typedef char *caddr_t;
31 31
  32 +#define WIN32_LEAN_AND_MEAN
32 # include <windows.h> 33 # include <windows.h>
33 # include <winsock2.h> 34 # include <winsock2.h>
34 # include <sys/timeb.h> 35 # include <sys/timeb.h>
tap-win32.c
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 #include "net.h" 30 #include "net.h"
31 #include "sysemu.h" 31 #include "sysemu.h"
32 #include <stdio.h> 32 #include <stdio.h>
  33 +#define WIN32_LEAN_AND_MEAN
33 #include <windows.h> 34 #include <windows.h>
34 35
35 /* NOTE: PCIBus is redefined in winddk.h */ 36 /* NOTE: PCIBus is redefined in winddk.h */
@@ -109,7 +109,7 @@ int inet_aton(const char *cp, struct in_addr *ia); @@ -109,7 +109,7 @@ int inet_aton(const char *cp, struct in_addr *ia);
109 #ifdef _WIN32 109 #ifdef _WIN32
110 #include <malloc.h> 110 #include <malloc.h>
111 #include <sys/timeb.h> 111 #include <sys/timeb.h>
112 -#include <windows.h> 112 +#include <mmsystem.h>
113 #define getopt_long_only getopt_long 113 #define getopt_long_only getopt_long
114 #define memalign(align, size) malloc(size) 114 #define memalign(align, size) malloc(size)
115 #endif 115 #endif
@@ -8966,7 +8966,7 @@ int main(int argc, char **argv) @@ -8966,7 +8966,7 @@ int main(int argc, char **argv)
8966 s->down_script[0]) 8966 s->down_script[0])
8967 launch_script(s->down_script, ifname, s->fd); 8967 launch_script(s->down_script, ifname, s->fd);
8968 } 8968 }
8969 - } 8969 + }
8970 } 8970 }
8971 #endif 8971 #endif
8972 return 0; 8972 return 0;