Francois Gouget : server: Don't include winsock. h to avoid creating a dependency on generated headers.

Alexandre Julliard julliard at winehq.org
Fri Mar 19 11:16:38 CDT 2010


Module: wine
Branch: master
Commit: bc8d21b5d7bb7735ed0d140744cb9b1655f776f9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc8d21b5d7bb7735ed0d140744cb9b1655f776f9

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Mar 19 10:16:04 2010 +0100

server: Don't include winsock.h to avoid creating a dependency on generated headers.

The dependency does not really exist thanks to various #ifdefs, but
makedep does not know that and records it which causes a build failure.

---

 server/sock.c |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/server/sock.c b/server/sock.c
index ed89ca2..5eaed6b 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -51,6 +51,7 @@
 #define WIN32_NO_STATUS
 #include "windef.h"
 #include "winternl.h"
+#include "winerror.h"
 
 #include "process.h"
 #include "file.h"
@@ -59,11 +60,34 @@
 #include "request.h"
 #include "user.h"
 
-/* To avoid conflicts with the Unix socket headers. Plus we only need a few
- * macros anyway.
+/* From winsock.h */
+#define FD_MAX_EVENTS              10
+#define FD_READ_BIT                0
+#define FD_WRITE_BIT               1
+#define FD_OOB_BIT                 2
+#define FD_ACCEPT_BIT              3
+#define FD_CONNECT_BIT             4
+#define FD_CLOSE_BIT               5
+
+/*
+ * Define flags to be used with the WSAAsyncSelect() call.
  */
-#define USE_WS_PREFIX
-#include "winsock2.h"
+#define FD_READ                    0x00000001
+#define FD_WRITE                   0x00000002
+#define FD_OOB                     0x00000004
+#define FD_ACCEPT                  0x00000008
+#define FD_CONNECT                 0x00000010
+#define FD_CLOSE                   0x00000020
+
+/* internal per-socket flags */
+#define FD_WINE_LISTENING          0x10000000
+#define FD_WINE_NONBLOCKING        0x20000000
+#define FD_WINE_CONNECTED          0x40000000
+#define FD_WINE_RAW                0x80000000
+#define FD_WINE_INTERNAL           0xFFFF0000
+
+/* Constants for WSAIoctl() */
+#define WSA_FLAG_OVERLAPPED        0x01
 
 struct sock
 {




More information about the wine-cvs mailing list