From ac70c40fb6457fe89966e6d93f311b5090711b50 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 22 May 2002 01:51:41 +0000 Subject: [PATCH] Add mswsock.h, move relevant definitions to this header. --- dlls/winsock/tests/sock.c | 1 + include/Makefile.in | 1 + include/mswsock.h | 46 +++++++++++++++++++++++++++++++++++++++ include/winsock.h | 9 +------- 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 include/mswsock.h diff --git a/dlls/winsock/tests/sock.c b/dlls/winsock/tests/sock.c index 541ace2d721..8347015a665 100644 --- a/dlls/winsock/tests/sock.c +++ b/dlls/winsock/tests/sock.c @@ -24,6 +24,7 @@ #include #undef USE_WS_PREFIX #include +#include #define MAX_CLIENTS 4 /* Max number of clients */ #define NUM_TESTS 2 /* Number of tests performed */ diff --git a/include/Makefile.in b/include/Makefile.in index 715bb96f172..638a0f94470 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -81,6 +81,7 @@ INSTALLED_INCLUDES = \ msvcrt/time.h \ msvcrt/wchar.h \ msvcrt/wctype.h \ + mswsock.h \ nb30.h \ nspapi.h \ ntsecapi.h \ diff --git a/include/mswsock.h b/include/mswsock.h new file mode 100644 index 00000000000..da021f962fd --- /dev/null +++ b/include/mswsock.h @@ -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_ */ diff --git a/include/winsock.h b/include/winsock.h index b567de79ab4..bc9f42a795c 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -614,9 +614,6 @@ typedef struct WS(WSAData) #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 @@ typedef struct WS(WSAData) #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 @@ u_short WINAPI WS(ntohs)(u_short); #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 */