Commit cfbd3384 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

ws2_32: Improve the prototypes Win64 compatibility by replacing long with LONG.

parent f2febca8
......@@ -2285,12 +2285,12 @@ INT WINAPI WSAIoctl(SOCKET s,
/***********************************************************************
* ioctlsocket (WS2_32.10)
*/
int WINAPI WS_ioctlsocket(SOCKET s, long cmd, WS_u_long *argp)
int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
{
int fd;
long newcmd = cmd;
TRACE("socket %04lx, cmd %08lx, ptr %p\n", s, cmd, argp);
TRACE("socket %04lx, cmd %08x, ptr %p\n", s, cmd, argp);
switch( cmd )
{
......@@ -2347,7 +2347,7 @@ int WINAPI WS_ioctlsocket(SOCKET s, long cmd, WS_u_long *argp)
/* FIXME: 0x667e above is ('f' << 8) | 126, and is a low word of
* FIONBIO (_IOW('f', 126, u_long)), how that should be handled?
*/
WARN("\tunknown WS_IOCTL cmd (%08lx)\n", cmd);
WARN("\tunknown WS_IOCTL cmd (%08x)\n", cmd);
break;
}
......@@ -3538,11 +3538,11 @@ int WINAPI WSAEnumNetworkEvents(SOCKET s, WSAEVENT hEvent, LPWSANETWORKEVENTS lp
/***********************************************************************
* WSAEventSelect (WS2_32.39)
*/
int WINAPI WSAEventSelect(SOCKET s, WSAEVENT hEvent, long lEvent)
int WINAPI WSAEventSelect(SOCKET s, WSAEVENT hEvent, LONG lEvent)
{
int ret;
TRACE("%08lx, hEvent %p, event %08x\n", s, hEvent, (unsigned)lEvent );
TRACE("%08lx, hEvent %p, event %08x\n", s, hEvent, lEvent);
SERVER_START_REQ( set_socket_event )
{
......@@ -3622,11 +3622,11 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
/***********************************************************************
* WSAAsyncSelect (WS2_32.101)
*/
INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, long lEvent)
INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, LONG lEvent)
{
int ret;
TRACE("%lx, hWnd %p, uMsg %08x, event %08lx\n", s, hWnd, uMsg, lEvent );
TRACE("%lx, hWnd %p, uMsg %08x, event %08x\n", s, hWnd, uMsg, lEvent);
SERVER_START_REQ( set_socket_event )
{
......
......@@ -441,8 +441,8 @@ typedef struct WS(fd_set)
#define _TIMEVAL_DEFINED
typedef struct WS(timeval)
{
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
LONG tv_sec; /* seconds */
LONG tv_usec; /* and microseconds */
} TIMEVAL, *PTIMEVAL, *LPTIMEVAL;
#endif
......@@ -549,31 +549,31 @@ static inline u_long __wine_ulong_swap(u_long l)
#define IN_CLASSA_MAX 128
#define IN_CLASSA_NET 0xff000000
#define IN_CLASSA_HOST 0x00ffffff
#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
#define IN_CLASSA(i) (((LONG)(i) & 0x80000000) == 0)
#define IN_CLASSB_NSHIFT 16
#define IN_CLASSB_MAX 65536
#define IN_CLASSB_NET 0xffff0000
#define IN_CLASSB_HOST 0x0000ffff
#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
#define IN_CLASSB(i) (((LONG)(i) & 0xc0000000) == 0x80000000)
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_NET 0xffffff00
#define IN_CLASSC_HOST 0x000000ff
#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
#define IN_CLASSC(i) (((LONG)(i) & 0xe0000000) == 0xc0000000)
#else
#define WS_IN_CLASSA_NSHIFT 24
#define WS_IN_CLASSA_MAX 128
#define WS_IN_CLASSA_NET 0xff000000
#define WS_IN_CLASSA_HOST 0x00ffffff
#define WS_IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
#define WS_IN_CLASSA(i) (((LONG)(i) & 0x80000000) == 0)
#define WS_IN_CLASSB_NSHIFT 16
#define WS_IN_CLASSB_MAX 65536
#define WS_IN_CLASSB_NET 0xffff0000
#define WS_IN_CLASSB_HOST 0x0000ffff
#define WS_IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
#define WS_IN_CLASSB(i) (((LONG)(i) & 0xc0000000) == 0x80000000)
#define WS_IN_CLASSC_NSHIFT 8
#define WS_IN_CLASSC_NET 0xffffff00
#define WS_IN_CLASSC_HOST 0x000000ff
#define WS_IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
#define WS_IN_CLASSC(i) (((LONG)(i) & 0xe0000000) == 0xc0000000)
#endif /* USE_WS_PREFIX */
#ifndef USE_WS_PREFIX
......@@ -721,8 +721,8 @@ typedef struct WS(WSAData)
#define WS_IOC_INOUT (WS_IOC_IN|WS_IOC_OUT)
#define WS__IO(x,y) (WS_IOC_VOID|((x)<<8)|(y))
#define WS__IOR(x,y,t) (WS_IOC_OUT|(((long)sizeof(t)&WS_IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define WS__IOW(x,y,t) (WS_IOC_IN|(((long)sizeof(t)&WS_IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define WS__IOR(x,y,t) (WS_IOC_OUT|(((LONG)sizeof(t)&WS_IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define WS__IOW(x,y,t) (WS_IOC_IN|(((LONG)sizeof(t)&WS_IOCPARM_MASK)<<16)|((x)<<8)|(y))
#endif
......@@ -1004,7 +1004,7 @@ HANDLE WINAPI WSAAsyncGetProtoByName(HWND,WS(u_int),const char*,char*,int);
HANDLE WINAPI WSAAsyncGetProtoByNumber(HWND,WS(u_int),int,char*,int);
HANDLE WINAPI WSAAsyncGetServByName(HWND,WS(u_int),const char*,const char*,char*,int);
HANDLE WINAPI WSAAsyncGetServByPort(HWND,WS(u_int),int,const char*,char*,int);
int WINAPI WSAAsyncSelect(SOCKET,HWND,WS(u_int),long);
int WINAPI WSAAsyncSelect(SOCKET,HWND,WS(u_int),LONG);
int WINAPI WSACancelAsyncRequest(HANDLE);
int WINAPI WSACancelBlockingCall(void);
int WINAPI WSACleanup(void);
......@@ -1034,7 +1034,7 @@ int WINAPI WS(getsockname)(SOCKET,struct WS(sockaddr)*,int*);
int WINAPI WS(getsockopt)(SOCKET,int,int,char*,int*);
WS(u_long) WINAPI WS(inet_addr)(const char*);
char* WINAPI WS(inet_ntoa)(struct WS(in_addr));
int WINAPI WS(ioctlsocket)(SOCKET,long,WS(u_long)*);
int WINAPI WS(ioctlsocket)(SOCKET,LONG,WS(u_long)*);
int WINAPI WS(listen)(SOCKET,int);
int WINAPI WS(recv)(SOCKET,char*,int,int);
int WINAPI WS(recvfrom)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
......
......@@ -289,7 +289,7 @@ DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
typedef struct _WSANETWORKEVENTS
{
long lNetworkEvents;
LONG lNetworkEvents;
int iErrorCode[FD_MAX_EVENTS];
} WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
......@@ -538,7 +538,7 @@ typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),long);
typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
typedef int (WINAPI *LPFN_WSACLEANUP)(void);
......@@ -568,9 +568,9 @@ typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
typedef WS(u_long) (WINAPI *LPFN_HTONL)(WS(u_long));
typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
typedef unsigned long (WINAPI *LPFN_INET_ADDR)(const char*);
typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr);
typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,long,WS(u_long)*);
typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,WS(u_long)*);
typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
typedef WS(u_long) (WINAPI *LPFN_NTOHL)(WS(u_long));
typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
......@@ -609,7 +609,7 @@ int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
#define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
int WINAPI WSAEventSelect(SOCKET,WSAEVENT,long);
int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
......@@ -682,7 +682,7 @@ typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENT)(SOCKET,WSAEVENT,LPWSANETWORKEVENT
typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
#define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,long);
typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
typedef BOOL (WINAPI *LPFNWSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
typedef INT (WINAPI *LPFNWSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
......
......@@ -5644,6 +5644,7 @@ GROUP
HANDLE
HWND
INT
LONG
SOCKET
UINT
WORD
......@@ -5652,7 +5653,6 @@ WS_u_long
WSAESETSERVICEOP
WSAEVENT
int
long
%ptr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment