Commit 815ac665 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Do not use the WS_ prefix in PE code.

parent 0c81cc27
EXTRADEFS = -DUSE_WS_PREFIX
MODULE = ws2_32.dll
IMPORTLIB = ws2_32
DELAYIMPORTS = advapi32 iphlpapi user32
......
......@@ -128,15 +128,15 @@ static int list_dup(char** l_src, char* ref, int item_size)
/* ----- hostent */
static LPARAM copy_he(void *base, int size, const struct WS_hostent *he)
static LPARAM copy_he(void *base, int size, const struct hostent *he)
{
char *p;
int needed;
struct WS_hostent *to = base;
struct hostent *to = base;
if (!he) return MAKELPARAM( 0, GetLastError() );
needed = sizeof(struct WS_hostent) + strlen(he->h_name) + 1 +
needed = sizeof(struct hostent) + strlen(he->h_name) + 1 +
list_size(he->h_aliases, 0) +
list_size(he->h_addr_list, he->h_length );
if (size < needed) return MAKELPARAM( needed, WSAENOBUFS );
......@@ -156,7 +156,7 @@ static LPARAM copy_he(void *base, int size, const struct WS_hostent *he)
static LPARAM async_gethostbyname( struct async_query_header *query )
{
struct async_query_gethostbyname *aq = CONTAINING_RECORD( query, struct async_query_gethostbyname, query );
struct WS_hostent *he = WS_gethostbyname( aq->host_name );
struct hostent *he = gethostbyname( aq->host_name );
return copy_he( query->sbuf, query->sbuflen, he );
}
......@@ -164,22 +164,22 @@ static LPARAM async_gethostbyname( struct async_query_header *query )
static LPARAM async_gethostbyaddr( struct async_query_header *query )
{
struct async_query_gethostbyaddr *aq = CONTAINING_RECORD( query, struct async_query_gethostbyaddr, query );
struct WS_hostent *he = WS_gethostbyaddr( aq->host_addr, aq->host_len, aq->host_type );
struct hostent *he = gethostbyaddr( aq->host_addr, aq->host_len, aq->host_type );
return copy_he( query->sbuf, query->sbuflen, he );
}
/* ----- protoent */
static LPARAM copy_pe(void *base, int size, const struct WS_protoent* pe)
static LPARAM copy_pe( void *base, int size, const struct protoent *pe )
{
char *p;
int needed;
struct WS_protoent *to = base;
struct protoent *to = base;
if (!pe) return MAKELPARAM( 0, GetLastError() );
needed = sizeof(struct WS_protoent) + strlen(pe->p_name) + 1 + list_size(pe->p_aliases, 0);
needed = sizeof(struct protoent) + strlen( pe->p_name ) + 1 + list_size( pe->p_aliases, 0 );
if (size < needed) return MAKELPARAM( needed, WSAENOBUFS );
to->p_proto = pe->p_proto;
......@@ -194,7 +194,7 @@ static LPARAM copy_pe(void *base, int size, const struct WS_protoent* pe)
static LPARAM async_getprotobyname( struct async_query_header *query )
{
struct async_query_getprotobyname *aq = CONTAINING_RECORD( query, struct async_query_getprotobyname, query );
struct WS_protoent *pe = WS_getprotobyname( aq->proto_name );
struct protoent *pe = getprotobyname( aq->proto_name );
return copy_pe( query->sbuf, query->sbuflen, pe );
}
......@@ -202,22 +202,22 @@ static LPARAM async_getprotobyname( struct async_query_header *query )
static LPARAM async_getprotobynumber( struct async_query_header *query )
{
struct async_query_getprotobynumber *aq = CONTAINING_RECORD( query, struct async_query_getprotobynumber, query );
struct WS_protoent *pe = WS_getprotobynumber( aq->proto_number );
struct protoent *pe = getprotobynumber( aq->proto_number );
return copy_pe( query->sbuf, query->sbuflen, pe );
}
/* ----- servent */
static LPARAM copy_se(void *base, int size, const struct WS_servent* se)
static LPARAM copy_se( void *base, int size, const struct servent *se )
{
char *p;
int needed;
struct WS_servent *to = base;
struct servent *to = base;
if (!se) return MAKELPARAM( 0, GetLastError() );
needed = sizeof(struct WS_servent) + strlen(se->s_proto) + strlen(se->s_name) + 2 + list_size(se->s_aliases, 0);
needed = sizeof(struct servent) + strlen( se->s_proto ) + strlen( se->s_name ) + 2 + list_size( se->s_aliases, 0 );
if (size < needed) return MAKELPARAM( needed, WSAENOBUFS );
to->s_port = se->s_port;
......@@ -234,7 +234,7 @@ static LPARAM copy_se(void *base, int size, const struct WS_servent* se)
static LPARAM async_getservbyname( struct async_query_header *query )
{
struct async_query_getservbyname *aq = CONTAINING_RECORD( query, struct async_query_getservbyname, query );
struct WS_servent *se = WS_getservbyname( aq->serv_name, aq->serv_proto );
struct servent *se = getservbyname( aq->serv_name, aq->serv_proto );
return copy_se( query->sbuf, query->sbuflen, se );
}
......@@ -242,7 +242,7 @@ static LPARAM async_getservbyname( struct async_query_header *query )
static LPARAM async_getservbyport( struct async_query_header *query )
{
struct async_query_getservbyport *aq = CONTAINING_RECORD( query, struct async_query_getservbyport, query );
struct WS_servent *se = WS_getservbyport( aq->serv_port, aq->serv_proto );
struct servent *se = getservbyport( aq->serv_port, aq->serv_proto );
return copy_se( query->sbuf, query->sbuflen, se );
}
......
......@@ -101,6 +101,7 @@
#include "windef.h"
#include "winerror.h"
#include "winternl.h"
#define USE_WS_PREFIX
#include "winsock2.h"
#include "ws2tcpip.h"
#include "wsipx.h"
......
1 stdcall accept(long ptr ptr) WS_accept
2 stdcall bind(long ptr long) WS_bind
3 stdcall closesocket(long) WS_closesocket
4 stdcall connect(long ptr long) WS_connect
5 stdcall getpeername(long ptr ptr) WS_getpeername
6 stdcall getsockname(long ptr ptr) WS_getsockname
7 stdcall getsockopt(long long long ptr ptr) WS_getsockopt
1 stdcall accept(long ptr ptr)
2 stdcall bind(long ptr long)
3 stdcall closesocket(long)
4 stdcall connect(long ptr long)
5 stdcall getpeername(long ptr ptr)
6 stdcall getsockname(long ptr ptr)
7 stdcall getsockopt(long long long ptr ptr)
8 stdcall htonl(long) WS_htonl
9 stdcall htons(long) WS_htons
10 stdcall ioctlsocket(long long ptr) WS_ioctlsocket
11 stdcall inet_addr(str) WS_inet_addr
12 stdcall inet_ntoa(ptr) WS_inet_ntoa
13 stdcall listen(long long) WS_listen
10 stdcall ioctlsocket(long long ptr)
11 stdcall inet_addr(str)
12 stdcall inet_ntoa(ptr)
13 stdcall listen(long long)
14 stdcall ntohl(long) WS_ntohl
15 stdcall ntohs(long) WS_ntohs
16 stdcall recv(long ptr long long) WS_recv
17 stdcall recvfrom(long ptr long long ptr ptr) WS_recvfrom
18 stdcall select(long ptr ptr ptr ptr) WS_select
19 stdcall send(long ptr long long) WS_send
20 stdcall sendto(long ptr long long ptr long) WS_sendto
21 stdcall setsockopt(long long long ptr long) WS_setsockopt
22 stdcall shutdown(long long) WS_shutdown
23 stdcall socket(long long long) WS_socket
51 stdcall gethostbyaddr(ptr long long) WS_gethostbyaddr
52 stdcall gethostbyname(str) WS_gethostbyname
53 stdcall getprotobyname(str) WS_getprotobyname
54 stdcall getprotobynumber(long) WS_getprotobynumber
55 stdcall getservbyname(str str) WS_getservbyname
56 stdcall getservbyport(long str) WS_getservbyport
57 stdcall gethostname(ptr long) WS_gethostname
16 stdcall recv(long ptr long long)
17 stdcall recvfrom(long ptr long long ptr ptr)
18 stdcall select(long ptr ptr ptr ptr)
19 stdcall send(long ptr long long)
20 stdcall sendto(long ptr long long ptr long)
21 stdcall setsockopt(long long long ptr long)
22 stdcall shutdown(long long)
23 stdcall socket(long long long)
51 stdcall gethostbyaddr(ptr long long)
52 stdcall gethostbyname(str)
53 stdcall getprotobyname(str)
54 stdcall getprotobynumber(long)
55 stdcall getservbyname(str str)
56 stdcall getservbyport(long str)
57 stdcall gethostname(ptr long)
101 stdcall WSAAsyncSelect(long long long long)
102 stdcall WSAAsyncGetHostByAddr(long long ptr long long ptr long)
......@@ -128,8 +128,8 @@
@ stub WSCUpdateProvider
@ stub WSCWriteNameSpaceOrder
@ stdcall WSCWriteProviderOrder(ptr long)
@ stdcall freeaddrinfo(ptr) WS_freeaddrinfo
@ stdcall getaddrinfo(str str ptr ptr) WS_getaddrinfo
@ stdcall getnameinfo(ptr long ptr long ptr long long) WS_getnameinfo
@ stdcall inet_ntop(long ptr ptr long) WS_inet_ntop
@ stdcall inet_pton(long str ptr) WS_inet_pton
@ stdcall freeaddrinfo(ptr)
@ stdcall getaddrinfo(str str ptr ptr)
@ stdcall getnameinfo(ptr long ptr long ptr long long)
@ stdcall inet_ntop(long ptr ptr long)
@ stdcall inet_pton(long str ptr)
......@@ -62,15 +62,15 @@
static const char magic_loopback_addr[] = {127, 12, 34, 56};
const char *debugstr_sockaddr( const struct WS_sockaddr *addr ) DECLSPEC_HIDDEN;
const char *debugstr_sockaddr( const struct sockaddr *addr ) DECLSPEC_HIDDEN;
struct per_thread_data
{
HANDLE sync_event; /* event to wait on for synchronous ioctls */
int opentype;
struct WS_hostent *he_buffer;
struct WS_servent *se_buffer;
struct WS_protoent *pe_buffer;
struct hostent *he_buffer;
struct servent *se_buffer;
struct protoent *pe_buffer;
int he_len;
int se_len;
int pe_len;
......
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