From 9e881be5bbfd4563c3dc1d5c80e81d1420f2535e Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 1 Apr 2002 21:01:13 +0000 Subject: [PATCH] Fix for the unistd.h vs. winsock.h problem in Winelib applications. Refine the WS_DEFINE_HTONL definition. --- dlls/winsock/ws2_32.spec | 2 +- dlls/wsock32/wsock32.spec | 2 +- include/winsock.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/winsock/ws2_32.spec b/dlls/winsock/ws2_32.spec index 7946a4f55b8..ecff1579b7d 100644 --- a/dlls/winsock/ws2_32.spec +++ b/dlls/winsock/ws2_32.spec @@ -69,7 +69,7 @@ debug_channels (winsock) 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 +57 stdcall -noimport gethostname(ptr long) WS_gethostname 58 stub WSAJoinLeaf 59 stub WSALookupServiceBeginA 60 stub WSALookupServiceBeginW diff --git a/dlls/wsock32/wsock32.spec b/dlls/wsock32/wsock32.spec index e2e6cb070b4..08c00ad7e9b 100644 --- a/dlls/wsock32/wsock32.spec +++ b/dlls/wsock32/wsock32.spec @@ -36,7 +36,7 @@ debug_channels (winsock) 54 forward getprotobynumber ws2_32.getprotobynumber 55 forward getservbyname ws2_32.getservbyname 56 forward getservbyport ws2_32.getservbyport - 57 forward gethostname ws2_32.gethostname + 57 forward -noimport gethostname ws2_32.gethostname 101 forward WSAAsyncSelect ws2_32.WSAAsyncSelect 102 forward WSAAsyncGetHostByAddr ws2_32.WSAAsyncGetHostByAddr 103 forward WSAAsyncGetHostByName ws2_32.WSAAsyncGetHostByName diff --git a/include/winsock.h b/include/winsock.h index 6b90bf03787..9ed2d0e1e9d 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -65,7 +65,7 @@ extern "C" { * we try to define our own prototypes (different calling convention). */ # include -# ifndef htonl +# if defined(USE_WS_PREFIX) || !defined(htonl) # define WS_DEFINE_HTONL # endif /* htonl */ #else @@ -913,7 +913,7 @@ int WINAPI WS(closesocket)(SOCKET); int WINAPI WS(connect)(SOCKET,const struct WS(sockaddr)*,int); struct WS(hostent)* WINAPI WS(gethostbyaddr)(const char*,int,int); struct WS(hostent)* WINAPI WS(gethostbyname)(const char*); -int WINAPI WS(gethostname)(char*,int); +/* gethostname not defined because of conflicts with unistd.h */ int WINAPI WS(getpeername)(SOCKET,struct WS(sockaddr)*,int*); struct WS(protoent)* WINAPI WS(getprotobyname)(const char*); struct WS(protoent)* WINAPI WS(getprotobynumber)(int);