win32 socket fixes


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1876 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/vl.c b/vl.c
index ef61918..26d3cce 100644
--- a/vl.c
+++ b/vl.c
@@ -66,12 +66,12 @@
 #include <malloc.h>
 #include <sys/timeb.h>
 #include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
 #define getopt_long_only getopt_long
 #define memalign(align, size) malloc(size)
 #endif
 
+#include "qemu_socket.h"
+
 #ifdef CONFIG_SDL
 #ifdef __APPLE__
 #include <SDL/SDL.h>
@@ -1085,12 +1085,6 @@
 
 #ifdef _WIN32
 
-#define socket_error() WSAGetLastError()
-#undef EINTR
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINTR       WSAEINTR
-#define EINPROGRESS WSAEINPROGRESS
-
 static void socket_cleanup(void)
 {
     WSACleanup();
@@ -1142,9 +1136,6 @@
 
 #else
 
-#define socket_error() errno
-#define closesocket(s) close(s)
-
 static int unix_write(int fd, const uint8_t *buf, int len1)
 {
     int ret, len;