Adding mswsock.h

Francois Gouget fgouget at free.fr
Mon May 20 18:22:23 CDT 2002


Changelog:

 * include/mswsock.h,
   include/winsock.h,
   dlls/winsock/tests/sock.c

   Add mswsock.h, move relevant definitions to this header
   Include mswsock.h in tests/sock.c so that it compiles with Visual C++


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
 "Only wimps use tape backup: _real_ men just upload their important stuff on
       ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds


--- /dev/null	Thu Mar 21 21:57:44 2002
+++ include/mswsock.h	Mon May 20 00:29:03 2002
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) the Wine project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef _MSWSOCK_
+#define _MSWSOCK_
+
+#ifndef USE_WS_PREFIX
+
+#define SO_OPENTYPE                0x7008
+#define SO_SYNCHRONOUS_ALERT       0x10
+#define SO_SYNCHRONOUS_NONALERT    0x20
+
+#else
+
+#define WS_SO_OPENTYPE             0x7008
+#define WS_SO_SYNCHRONOUS_ALERT    0x10
+#define WS_SO_SYNCHRONOUS_NONALERT 0x20
+
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+int WINAPI WSARecvEx(SOCKET,char*,int,int*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _MSWSOCK_ */
Index: include/winsock.h
===================================================================
RCS file: /home/wine/wine/include/winsock.h,v
retrieving revision 1.43
diff -u -r1.43 winsock.h
--- include/winsock.h	22 Apr 2002 22:33:12 -0000	1.43
+++ include/winsock.h	20 May 2002 22:43:43 -0000
@@ -614,9 +614,6 @@
 #define SO_ERROR                   0x1007
 #define SO_TYPE                    0x1008

-#define SO_OPENTYPE                0x7008
-#define SO_SYNCHRONOUS_ALERT       0x10
-#define SO_SYNCHRONOUS_NONALERT    0x20

 #define IOCPARM_MASK               0x7f
 #define IOC_VOID                   0x20000000
@@ -650,10 +647,6 @@
 #define WS_SO_ERROR                0x1007
 #define WS_SO_TYPE                 0x1008

-#define WS_SO_OPENTYPE             0x7008
-#define WS_SO_SYNCHRONOUS_ALERT    0x10
-#define WS_SO_SYNCHRONOUS_NONALERT 0x20
-
 #define WS_IOCPARM_MASK            0x7f
 #define WS_IOC_VOID                0x20000000
 #define WS_IOC_OUT                 0x40000000
@@ -946,7 +939,7 @@
 #if defined(__WINE__) || !defined(__WINE_WINSOCK2__)
 /* Stuff specific to winsock.h */

-int WINAPI WSARecvEx(SOCKET,char*,int,int*);
+#include "mswsock.h"

 #endif /* __WINE_WINSOCK2__ */
 #endif /* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */
Index: dlls/winsock/tests/sock.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/tests/sock.c,v
retrieving revision 1.1
diff -u -r1.1 sock.c
--- dlls/winsock/tests/sock.c	27 Apr 2002 01:27:34 -0000	1.1
+++ dlls/winsock/tests/sock.c	20 May 2002 22:43:34 -0000
@@ -24,6 +24,7 @@
 #include <winerror.h>
 #undef USE_WS_PREFIX
 #include <winsock2.h>
+#include <mswsock.h>

 #define MAX_CLIENTS 4      /* Max number of clients */
 #define NUM_TESTS   2      /* Number of tests performed */




More information about the wine-patches mailing list