ws2_32: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2895f0fd22
commit
4a56c41462
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
MODULE = ws2_32.dll
|
||||
UNIXLIB = ws2_32.so
|
||||
IMPORTLIB = ws2_32
|
||||
|
|
|
@ -452,7 +452,8 @@ INT WINAPI WSApSetPostRoutine(LPWPUPOSTMESSAGE lpPostRoutine)
|
|||
WSAEVENT WINAPI WPUCompleteOverlappedRequest(SOCKET s, LPWSAOVERLAPPED overlapped,
|
||||
DWORD error, DWORD transferred, LPINT errcode)
|
||||
{
|
||||
FIXME("(0x%08lx,%p,0x%08x,0x%08x,%p), stub !\n", s, overlapped, error, transferred, errcode);
|
||||
FIXME( "socket %#Ix, overlapped %p, error %lu, transferred %lu, errcode %p, stub!\n",
|
||||
s, overlapped, error, transferred, errcode );
|
||||
|
||||
if (errcode)
|
||||
*errcode = WSAEINVAL;
|
||||
|
|
|
@ -229,7 +229,7 @@ done:
|
|||
|
||||
for (ai = *info; ai != NULL; ai = ai->ai_next)
|
||||
{
|
||||
TRACE( "=> %p, flags %#x, family %d, type %d, protocol %d, len %ld, name %s, addr %s\n",
|
||||
TRACE( "=> %p, flags %#x, family %d, type %d, protocol %d, len %Id, name %s, addr %s\n",
|
||||
ai, ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen,
|
||||
ai->ai_canonname, debugstr_sockaddr(ai->ai_addr) );
|
||||
}
|
||||
|
@ -489,11 +489,11 @@ int WINAPI GetAddrInfoExW( const WCHAR *name, const WCHAR *servname, DWORD names
|
|||
{
|
||||
int ret;
|
||||
|
||||
TRACE( "name %s, servname %s, namespace %u, namespace_id %s)\n",
|
||||
TRACE( "name %s, servname %s, namespace %lu, namespace_id %s)\n",
|
||||
debugstr_w(name), debugstr_w(servname), namespace, debugstr_guid(namespace_id) );
|
||||
|
||||
if (namespace != NS_DNS)
|
||||
FIXME( "Unsupported namespace %u\n", namespace );
|
||||
FIXME( "Unsupported namespace %lu\n", namespace );
|
||||
if (namespace_id)
|
||||
FIXME( "Unsupported namespace_id %s\n", debugstr_guid(namespace_id) );
|
||||
if (timeout)
|
||||
|
@ -639,7 +639,7 @@ int WINAPI getnameinfo( const SOCKADDR *addr, socklen_t addr_len, char *host,
|
|||
{
|
||||
struct getnameinfo_params params = { addr, addr_len, host, host_len, serv, serv_len, flags };
|
||||
|
||||
TRACE( "addr %s, addr_len %d, host %p, host_len %u, serv %p, serv_len %d, flags %#x\n",
|
||||
TRACE( "addr %s, addr_len %d, host %p, host_len %lu, serv %p, serv_len %lu, flags %#x\n",
|
||||
debugstr_sockaddr(addr), addr_len, host, host_len, serv, serv_len, flags );
|
||||
|
||||
return WS_CALL( getnameinfo, ¶ms );
|
||||
|
@ -1054,7 +1054,7 @@ static char *read_etc_file( const WCHAR *filename, DWORD *ret_size )
|
|||
if ((ret = RegGetValueW( HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Services\\tcpip\\Parameters",
|
||||
L"DatabasePath", RRF_RT_REG_SZ, NULL, path, &size )))
|
||||
{
|
||||
ERR( "failed to get database path, error %u\n", ret );
|
||||
ERR( "failed to get database path, error %lu\n", ret );
|
||||
return NULL;
|
||||
}
|
||||
wcscat( path, L"\\" );
|
||||
|
@ -1063,14 +1063,14 @@ static char *read_etc_file( const WCHAR *filename, DWORD *ret_size )
|
|||
file = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ERR( "failed to open %s, error %u\n", debugstr_w( path ), GetLastError() );
|
||||
ERR( "failed to open %s, error %lu\n", debugstr_w( path ), GetLastError() );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size = GetFileSize( file, NULL );
|
||||
if (!(data = malloc( size )) || !ReadFile( file, data, size, ret_size, NULL ))
|
||||
{
|
||||
WARN( "failed to read file, error %u\n", GetLastError() );
|
||||
WARN( "failed to read file, error %lu\n", GetLastError() );
|
||||
free( data );
|
||||
data = NULL;
|
||||
}
|
||||
|
@ -1502,7 +1502,7 @@ const char * WINAPI inet_ntop( int family, void *addr, char *buffer, SIZE_T len
|
|||
NTSTATUS status;
|
||||
ULONG size = min( len, (ULONG)-1 );
|
||||
|
||||
TRACE( "family %d, addr %p, buffer %p, len %ld\n", family, addr, buffer, len );
|
||||
TRACE( "family %d, addr %p, buffer %p, len %Id\n", family, addr, buffer, len );
|
||||
if (!buffer)
|
||||
{
|
||||
SetLastError( STATUS_INVALID_PARAMETER );
|
||||
|
@ -1603,7 +1603,7 @@ const WCHAR * WINAPI InetNtopW( int family, void *addr, WCHAR *buffer, SIZE_T le
|
|||
char bufferA[INET6_ADDRSTRLEN];
|
||||
PWSTR ret = NULL;
|
||||
|
||||
TRACE( "family %d, addr %p, buffer %p, len %ld\n", family, addr, buffer, len );
|
||||
TRACE( "family %d, addr %p, buffer %p, len %Iu\n", family, addr, buffer, len );
|
||||
|
||||
if (inet_ntop( family, addr, bufferA, sizeof(bufferA) ))
|
||||
{
|
||||
|
@ -1789,7 +1789,7 @@ int WINAPI WSAAddressToStringA( struct sockaddr *addr, DWORD addr_len,
|
|||
return -1;
|
||||
}
|
||||
if (addr6->sin6_scope_id)
|
||||
sprintf( buffer + strlen( buffer ), "%%%u", addr6->sin6_scope_id );
|
||||
sprintf( buffer + strlen( buffer ), "%%%lu", addr6->sin6_scope_id );
|
||||
if (addr6->sin6_port)
|
||||
sprintf( buffer + strlen( buffer ), "]:%u", ntohs( addr6->sin6_port ) );
|
||||
break;
|
||||
|
@ -1809,7 +1809,7 @@ int WINAPI WSAAddressToStringA( struct sockaddr *addr, DWORD addr_len,
|
|||
return -1;
|
||||
}
|
||||
|
||||
TRACE( "=> %s, %u bytes\n", debugstr_a(buffer), size );
|
||||
TRACE( "=> %s, %lu chars\n", debugstr_a(buffer), size );
|
||||
*string_len = size;
|
||||
strcpy( string, buffer );
|
||||
return 0;
|
||||
|
@ -1825,12 +1825,12 @@ int WINAPI WSAAddressToStringW( struct sockaddr *addr, DWORD addr_len,
|
|||
INT ret;
|
||||
char buf[54]; /* 32 digits + 7':' + '[' + '%" + 5 digits + ']:' + 5 digits + '\0' */
|
||||
|
||||
TRACE( "(%p, %d, %p, %p, %p)\n", addr, addr_len, info, string, string_len );
|
||||
TRACE( "(%p, %lu, %p, %p, %p)\n", addr, addr_len, info, string, string_len );
|
||||
|
||||
if ((ret = WSAAddressToStringA( addr, addr_len, NULL, buf, string_len ))) return ret;
|
||||
|
||||
MultiByteToWideChar( CP_ACP, 0, buf, *string_len, string, *string_len );
|
||||
TRACE( "=> %s, %u chars\n", debugstr_w(string), *string_len );
|
||||
TRACE( "=> %s, %lu chars\n", debugstr_w(string), *string_len );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2022,7 +2022,7 @@ int WINAPI WSAGetServiceClassNameByClassIdW( GUID *class, WCHAR *service, DWORD
|
|||
*/
|
||||
int WINAPI WSALookupServiceBeginA( WSAQUERYSETA *query, DWORD flags, HANDLE *lookup )
|
||||
{
|
||||
FIXME( "(%p 0x%08x %p) Stub!\n", query, flags, lookup );
|
||||
FIXME( "(%p %#lx %p) Stub!\n", query, flags, lookup );
|
||||
SetLastError( WSA_NOT_ENOUGH_MEMORY );
|
||||
return -1;
|
||||
}
|
||||
|
@ -2033,7 +2033,7 @@ int WINAPI WSALookupServiceBeginA( WSAQUERYSETA *query, DWORD flags, HANDLE *loo
|
|||
*/
|
||||
int WINAPI WSALookupServiceBeginW( WSAQUERYSETW *query, DWORD flags, HANDLE *lookup )
|
||||
{
|
||||
FIXME( "(%p 0x%08x %p) Stub!\n", query, flags, lookup );
|
||||
FIXME( "(%p %#lx %p) Stub!\n", query, flags, lookup );
|
||||
SetLastError( WSA_NOT_ENOUGH_MEMORY );
|
||||
return -1;
|
||||
}
|
||||
|
@ -2054,7 +2054,7 @@ int WINAPI WSALookupServiceEnd( HANDLE lookup )
|
|||
*/
|
||||
int WINAPI WSALookupServiceNextA( HANDLE lookup, DWORD flags, DWORD *len, WSAQUERYSETA *results )
|
||||
{
|
||||
FIXME( "(%p 0x%08x %p %p) Stub!\n", lookup, flags, len, results );
|
||||
FIXME( "(%p %#lx %p %p) Stub!\n", lookup, flags, len, results );
|
||||
SetLastError( WSA_E_NO_MORE );
|
||||
return -1;
|
||||
}
|
||||
|
@ -2065,7 +2065,7 @@ int WINAPI WSALookupServiceNextA( HANDLE lookup, DWORD flags, DWORD *len, WSAQUE
|
|||
*/
|
||||
int WINAPI WSALookupServiceNextW( HANDLE lookup, DWORD flags, DWORD *len, WSAQUERYSETW *results )
|
||||
{
|
||||
FIXME( "(%p 0x%08x %p %p) Stub!\n", lookup, flags, len, results );
|
||||
FIXME( "(%p %#lx %p %p) Stub!\n", lookup, flags, len, results );
|
||||
SetLastError( WSA_E_NO_MORE );
|
||||
return -1;
|
||||
}
|
||||
|
@ -2076,7 +2076,7 @@ int WINAPI WSALookupServiceNextW( HANDLE lookup, DWORD flags, DWORD *len, WSAQUE
|
|||
*/
|
||||
int WINAPI WSASetServiceA( WSAQUERYSETA *query, WSAESETSERVICEOP operation, DWORD flags )
|
||||
{
|
||||
FIXME( "(%p 0x%08x 0x%08x) Stub!\n", query, operation, flags );
|
||||
FIXME( "(%p %#x %#lx) Stub!\n", query, operation, flags );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2086,7 +2086,7 @@ int WINAPI WSASetServiceA( WSAQUERYSETA *query, WSAESETSERVICEOP operation, DWOR
|
|||
*/
|
||||
int WINAPI WSASetServiceW( WSAQUERYSETW *query, WSAESETSERVICEOP operation, DWORD flags )
|
||||
{
|
||||
FIXME( "(%p 0x%08x 0x%08x) Stub!\n", query, operation, flags );
|
||||
FIXME( "(%p %#x %#lx) Stub!\n", query, operation, flags );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2129,7 +2129,7 @@ int WINAPI WSANSPIoctl( HANDLE lookup, DWORD code, void *in_buffer,
|
|||
DWORD in_size, void *out_buffer, DWORD out_size,
|
||||
DWORD *ret_size, WSACOMPLETION *completion )
|
||||
{
|
||||
FIXME( "(%p, 0x%08x, %p, 0x%08x, %p, 0x%08x, %p, %p) Stub!\n", lookup, code,
|
||||
FIXME( "(%p, %#lx, %p, %#lx, %p, %#lx, %p, %p) Stub!\n", lookup, code,
|
||||
in_buffer, in_size, out_buffer, out_size, ret_size, completion );
|
||||
SetLastError( WSA_NOT_ENOUGH_MEMORY );
|
||||
return -1;
|
||||
|
@ -2141,7 +2141,7 @@ int WINAPI WSANSPIoctl( HANDLE lookup, DWORD code, void *in_buffer,
|
|||
*/
|
||||
int WINAPI WSCEnableNSProvider( GUID *provider, BOOL enable )
|
||||
{
|
||||
FIXME( "(%s 0x%08x) Stub!\n", debugstr_guid(provider), enable );
|
||||
FIXME( "(%s %d) Stub!\n", debugstr_guid(provider), enable );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2152,7 +2152,7 @@ int WINAPI WSCEnableNSProvider( GUID *provider, BOOL enable )
|
|||
int WINAPI WSCGetProviderInfo( GUID *provider, WSC_PROVIDER_INFO_TYPE info_type,
|
||||
BYTE *info, size_t *len, DWORD flags, int *errcode )
|
||||
{
|
||||
FIXME( "(%s 0x%08x %p %p 0x%08x %p) Stub!\n",
|
||||
FIXME( "(%s %#x %p %p %#lx %p) Stub!\n",
|
||||
debugstr_guid(provider), info_type, info, len, flags, errcode );
|
||||
|
||||
if (!errcode)
|
||||
|
@ -2200,7 +2200,7 @@ int WINAPI WSCGetProviderPath( GUID *provider, WCHAR *path, int *len, int *errco
|
|||
int WINAPI WSCInstallNameSpace( WCHAR *identifier, WCHAR *path, DWORD namespace,
|
||||
DWORD version, GUID *provider )
|
||||
{
|
||||
FIXME( "(%s %s 0x%08x 0x%08x %s) Stub!\n", debugstr_w(identifier), debugstr_w(path),
|
||||
FIXME( "(%s %s %#lx %#lx %s) Stub!\n", debugstr_w(identifier), debugstr_w(path),
|
||||
namespace, version, debugstr_guid(provider) );
|
||||
return 0;
|
||||
}
|
||||
|
@ -2221,7 +2221,7 @@ int WINAPI WSCUnInstallNameSpace( GUID *provider )
|
|||
*/
|
||||
int WINAPI WSCWriteProviderOrder( DWORD *entry, DWORD number )
|
||||
{
|
||||
FIXME( "(%p 0x%08x) Stub!\n", entry, number );
|
||||
FIXME( "(%p %#lx) Stub!\n", entry, number );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2232,7 +2232,7 @@ int WINAPI WSCWriteProviderOrder( DWORD *entry, DWORD number )
|
|||
int WINAPI WSCInstallProvider( GUID *provider, const WCHAR *path,
|
||||
WSAPROTOCOL_INFOW *protocol_info, DWORD count, int *err )
|
||||
{
|
||||
FIXME( "(%s, %s, %p, %d, %p): stub !\n", debugstr_guid(provider),
|
||||
FIXME( "(%s, %s, %p, %lu, %p): stub !\n", debugstr_guid(provider),
|
||||
debugstr_w(path), protocol_info, count, err );
|
||||
*err = 0;
|
||||
return 0;
|
||||
|
@ -2256,7 +2256,7 @@ int WINAPI WSCDeinstallProvider( GUID *provider, int *err )
|
|||
int WINAPI WSCSetApplicationCategory( const WCHAR *path, DWORD len, const WCHAR *extra, DWORD extralen,
|
||||
DWORD lspcat, DWORD *prev_lspcat, int *err )
|
||||
{
|
||||
FIXME( "(%s %d %s %d %d %p) Stub!\n", debugstr_w(path), len, debugstr_w(extra),
|
||||
FIXME( "(%s %lu %s %lu %#lx %p) Stub!\n", debugstr_w(path), len, debugstr_w(extra),
|
||||
extralen, lspcat, prev_lspcat );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ const char *debugstr_sockaddr( const struct sockaddr *a )
|
|||
p = inet_ntop( AF_INET6, &sin->sin6_addr, buf, sizeof(buf) );
|
||||
if (!p)
|
||||
p = "(unknown IPv6 address)";
|
||||
return wine_dbg_sprintf("{ family AF_INET6, address %s, flow label %#x, port %d, scope %u }",
|
||||
return wine_dbg_sprintf("{ family AF_INET6, address %s, flow label %#lx, port %d, scope %lu }",
|
||||
p, sin->sin6_flowinfo, ntohs(sin->sin6_port), sin->sin6_scope_id );
|
||||
}
|
||||
case AF_IPX:
|
||||
|
@ -205,7 +205,7 @@ const char *debugstr_sockaddr( const struct sockaddr *a )
|
|||
|
||||
memcpy( &addr, ((const SOCKADDR_IRDA *)a)->irdaDeviceID, sizeof(addr) );
|
||||
addr = ntohl( addr );
|
||||
return wine_dbg_sprintf("{ family AF_IRDA, addr %08x, name %s }",
|
||||
return wine_dbg_sprintf("{ family AF_IRDA, addr %08lx, name %s }",
|
||||
addr,
|
||||
((const SOCKADDR_IRDA *)a)->irdaServiceName);
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ static inline const char *debugstr_optval(const char *optval, int optlenval)
|
|||
{
|
||||
DWORD value = 0;
|
||||
memcpy(&value, optval, optlenval);
|
||||
return wine_dbg_sprintf("%p (%u)", optval, value);
|
||||
return wine_dbg_sprintf("%p (%lu)", optval, value);
|
||||
}
|
||||
return wine_dbg_sprintf("%p", optval);
|
||||
}
|
||||
|
@ -646,8 +646,7 @@ static INT WS_DuplicateSocket(BOOL unicode, SOCKET s, DWORD dwProcessId, LPWSAPR
|
|||
int size;
|
||||
WSAPROTOCOL_INFOW infow;
|
||||
|
||||
TRACE("(unicode %d, socket %04lx, processid %x, buffer %p)\n",
|
||||
unicode, s, dwProcessId, lpProtocolInfo);
|
||||
TRACE( "unicode %d, socket %#Ix, pid %#lx, info %p\n", unicode, s, dwProcessId, lpProtocolInfo );
|
||||
|
||||
if (!ws_protocol_info(s, unicode, &infow, &size))
|
||||
return SOCKET_ERROR;
|
||||
|
@ -735,7 +734,7 @@ SOCKET WINAPI accept( SOCKET s, struct sockaddr *addr, int *len )
|
|||
HANDLE sync_event;
|
||||
SOCKET ret;
|
||||
|
||||
TRACE("%#lx\n", s);
|
||||
TRACE( "socket %#Ix\n", s );
|
||||
|
||||
if (!(sync_event = get_sync_event())) return INVALID_SOCKET;
|
||||
status = NtDeviceIoControlFile( (HANDLE)s, sync_event, NULL, NULL, &io, IOCTL_AFD_WINE_ACCEPT,
|
||||
|
@ -748,7 +747,7 @@ SOCKET WINAPI accept( SOCKET s, struct sockaddr *addr, int *len )
|
|||
}
|
||||
if (status)
|
||||
{
|
||||
WARN("failed; status %#x\n", status);
|
||||
WARN( "failed; status %#lx\n", status );
|
||||
WSASetLastError( NtStatusToWSAError( status ) );
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
@ -765,7 +764,7 @@ SOCKET WINAPI accept( SOCKET s, struct sockaddr *addr, int *len )
|
|||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
TRACE("returning %#lx\n", ret);
|
||||
TRACE( "returning %#Ix\n", ret );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -784,7 +783,7 @@ static BOOL WINAPI WS2_AcceptEx( SOCKET listener, SOCKET acceptor, void *dest, D
|
|||
void *cvalue = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "listener %#lx, acceptor %#lx, dest %p, recv_len %u, local_len %u, remote_len %u, ret_len %p, "
|
||||
TRACE( "listener %#Ix, acceptor %#Ix, dest %p, recv_len %lu, local_len %lu, remote_len %lu, ret_len %p, "
|
||||
"overlapped %p\n", listener, acceptor, dest, recv_len, local_len, remote_len, ret_len, overlapped );
|
||||
|
||||
if (!overlapped)
|
||||
|
@ -828,7 +827,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE file, DWORD file_len, DWOR
|
|||
void *cvalue = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, file %p, file_len %u, buffer_size %u, overlapped %p, buffers %p, flags %#x\n",
|
||||
TRACE( "socket %#Ix, file %p, file_len %lu, buffer_size %lu, overlapped %p, buffers %p, flags %#lx\n",
|
||||
s, file, file_len, buffer_size, overlapped, buffers, flags );
|
||||
|
||||
if (overlapped)
|
||||
|
@ -880,8 +879,12 @@ static void WINAPI WS2_GetAcceptExSockaddrs( void *buffer, DWORD data_size, DWOR
|
|||
struct sockaddr **remote_addr, LPINT remote_addr_len )
|
||||
{
|
||||
char *cbuf = buffer;
|
||||
TRACE("(%p, %d, %d, %d, %p, %p, %p, %p)\n", buffer, data_size, local_size, remote_size, local_addr,
|
||||
local_addr_len, remote_addr, remote_addr_len );
|
||||
|
||||
TRACE( "buffer %p, data_size %lu, local_size %lu, remote_size %lu,"
|
||||
" local_addr %p, local_addr_len %p, remote_addr %p, remote_addr_len %p\n",
|
||||
buffer, data_size, local_size, remote_size,
|
||||
local_addr, local_addr_len, remote_addr, remote_addr_len );
|
||||
|
||||
cbuf += data_size;
|
||||
|
||||
*local_addr_len = *(int *) cbuf;
|
||||
|
@ -911,7 +914,7 @@ static int WS2_recv_base( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *
|
|||
void *cvalue = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, buffers %p, buffer_count %u, flags %#x, addr %p, "
|
||||
TRACE( "socket %#Ix, buffers %p, buffer_count %lu, flags %#lx, addr %p, "
|
||||
"addr_len %d, overlapped %p, completion %p, control %p\n",
|
||||
s, buffers, buffer_count, *flags, addr, addr_len ? *addr_len : -1, overlapped, completion, control );
|
||||
|
||||
|
@ -966,7 +969,7 @@ static int WS2_sendto( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *ret
|
|||
void *cvalue = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, buffers %p, buffer_count %u, flags %#x, addr %p, "
|
||||
TRACE( "socket %#Ix, buffers %p, buffer_count %lu, flags %#lx, addr %p, "
|
||||
"addr_len %d, overlapped %p, completion %p\n",
|
||||
s, buffers, buffer_count, flags, addr, addr_len, overlapped, completion );
|
||||
|
||||
|
@ -1075,7 +1078,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
|
|||
HANDLE sync_event;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, addr %s\n", s, debugstr_sockaddr(addr) );
|
||||
TRACE( "socket %#Ix, addr %s\n", s, debugstr_sockaddr(addr) );
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
|
@ -1161,7 +1164,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
|
|||
*/
|
||||
int WINAPI closesocket( SOCKET s )
|
||||
{
|
||||
TRACE( "%#lx\n", s );
|
||||
TRACE( "%#Ix\n", s );
|
||||
|
||||
if (!num_startup)
|
||||
{
|
||||
|
@ -1190,7 +1193,7 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
|
|||
HANDLE sync_event;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, addr %s, len %d\n", s, debugstr_sockaddr(addr), len );
|
||||
TRACE( "socket %#Ix, addr %s, len %d\n", s, debugstr_sockaddr(addr), len );
|
||||
|
||||
if (!(sync_event = get_sync_event())) return -1;
|
||||
|
||||
|
@ -1241,7 +1244,7 @@ static BOOL WINAPI WS2_ConnectEx( SOCKET s, const struct sockaddr *name, int nam
|
|||
void *cvalue = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, ptr %p %s, length %d, send_buffer %p, send_len %u, overlapped %p\n",
|
||||
TRACE( "socket %#Ix, ptr %p %s, length %d, send_buffer %p, send_len %lu, overlapped %p\n",
|
||||
s, name, debugstr_sockaddr(name), namelen, send_buffer, send_len, overlapped );
|
||||
|
||||
if (!overlapped)
|
||||
|
@ -1282,7 +1285,7 @@ static BOOL WINAPI WS2_DisconnectEx( SOCKET s, OVERLAPPED *overlapped, DWORD fla
|
|||
HANDLE event = 0;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, overlapped %p, flags %#x, reserved %#x\n", s, overlapped, flags, reserved );
|
||||
TRACE( "socket %#Ix, overlapped %p, flags %#lx, reserved %#lx\n", s, overlapped, flags, reserved );
|
||||
|
||||
if (flags & TF_REUSE_SOCKET)
|
||||
FIXME( "Reusing socket not supported yet\n" );
|
||||
|
@ -1312,7 +1315,7 @@ int WINAPI getpeername( SOCKET s, struct sockaddr *addr, int *len )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, addr %p, len %d\n", s, addr, len ? *len : 0 );
|
||||
TRACE( "socket %#Ix, addr %p, len %d\n", s, addr, len ? *len : 0 );
|
||||
|
||||
if (!socket_list_find( s ))
|
||||
{
|
||||
|
@ -1343,7 +1346,7 @@ int WINAPI getsockname( SOCKET s, struct sockaddr *addr, int *len )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, addr %p, len %d\n", s, addr, len ? *len : 0 );
|
||||
TRACE( "socket %#Ix, addr %p, len %d\n", s, addr, len ? *len : 0 );
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
|
@ -1378,9 +1381,8 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl
|
|||
{
|
||||
INT ret = 0;
|
||||
|
||||
TRACE("(socket %04lx, %s, optval %s, optlen %p (%d))\n", s,
|
||||
debugstr_sockopt(level, optname), debugstr_optval(optval, 0),
|
||||
optlen, optlen ? *optlen : 0);
|
||||
TRACE( "socket %#Ix, %s, optval %p, optlen %p (%d)\n",
|
||||
s, debugstr_sockopt(level, optname), optval, optlen, optlen ? *optlen : 0 );
|
||||
|
||||
if ((level != SOL_SOCKET || optname != SO_OPENTYPE) &&
|
||||
!socket_list_find( s ))
|
||||
|
@ -1952,7 +1954,7 @@ static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_s
|
|||
}
|
||||
if (status == STATUS_NOT_SUPPORTED)
|
||||
{
|
||||
FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n",
|
||||
FIXME("Unsupported ioctl %#lx (device=%#lx access=%#lx func=%#lx method=%#lx)\n",
|
||||
code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3);
|
||||
}
|
||||
else if (status == STATUS_SUCCESS)
|
||||
|
@ -1970,8 +1972,10 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
|
|||
DWORD out_size, LPDWORD ret_size, LPWSAOVERLAPPED overlapped,
|
||||
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion )
|
||||
{
|
||||
TRACE("%04lx, %s, %p, %d, %p, %d, %p, %p, %p\n",
|
||||
s, debugstr_wsaioctl(code), in_buff, in_size, out_buff, out_size, ret_size, overlapped, completion);
|
||||
TRACE( "socket %#Ix, %s, in_buff %p, in_size %#lx, out_buff %p,"
|
||||
" out_size %#lx, ret_size %p, overlapped %p, completion %p\n",
|
||||
s, debugstr_wsaioctl(code), in_buff, in_size, out_buff,
|
||||
out_size, ret_size, overlapped, completion );
|
||||
|
||||
if (!ret_size)
|
||||
{
|
||||
|
@ -2207,8 +2211,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
|
|||
}
|
||||
if (found_index == ipAddrTable->dwNumEntries)
|
||||
{
|
||||
ERR("no matching IP address for interface %d\n",
|
||||
row.dwForwardIfIndex);
|
||||
ERR( "no matching IP address for interface %lu\n", row.dwForwardIfIndex );
|
||||
free( ipAddrTable );
|
||||
SetLastError( WSAEFAULT );
|
||||
return -1;
|
||||
|
@ -2314,7 +2317,7 @@ int WINAPI listen( SOCKET s, int backlog )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, backlog %d\n", s, backlog );
|
||||
TRACE( "socket %#Ix, backlog %d\n", s, backlog );
|
||||
|
||||
status = NtDeviceIoControlFile( SOCKET2HANDLE(s), NULL, NULL, NULL, &io,
|
||||
IOCTL_AFD_LISTEN, ¶ms, sizeof(params), NULL, 0 );
|
||||
|
@ -2750,9 +2753,8 @@ static int server_setsockopt( SOCKET s, ULONG code, const char *optval, int optl
|
|||
*/
|
||||
int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int optlen )
|
||||
{
|
||||
TRACE("(socket %04lx, %s, optval %s, optlen %d)\n", s,
|
||||
debugstr_sockopt(level, optname), debugstr_optval(optval, optlen),
|
||||
optlen);
|
||||
TRACE( "socket %#Ix, %s, optval %s, optlen %d\n",
|
||||
s, debugstr_sockopt(level, optname), debugstr_optval(optval, optlen), optlen );
|
||||
|
||||
/* some broken apps pass the value directly instead of a pointer to it */
|
||||
if(optlen && IS_INTRESOURCE(optval))
|
||||
|
@ -3048,7 +3050,7 @@ int WINAPI shutdown( SOCKET s, int how )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, how %u\n", s, how );
|
||||
TRACE( "socket %#Ix, how %u\n", s, how );
|
||||
|
||||
status = NtDeviceIoControlFile( (HANDLE)s, NULL, NULL, NULL, &io,
|
||||
IOCTL_AFD_WINE_SHUTDOWN, &how, sizeof(how), NULL, 0 );
|
||||
|
@ -3078,7 +3080,7 @@ int WINAPI WSAEnumNetworkEvents( SOCKET s, WSAEVENT event, WSANETWORKEVENTS *ret
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, event %p, events %p\n", s, event, ret_events );
|
||||
TRACE( "socket %#Ix, event %p, events %p\n", s, event, ret_events );
|
||||
|
||||
ResetEvent( event );
|
||||
|
||||
|
@ -3146,7 +3148,7 @@ int WINAPI WSAEventSelect( SOCKET s, WSAEVENT event, LONG mask )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, event %p, mask %#x\n", s, event, mask );
|
||||
TRACE( "socket %#Ix, event %p, mask %#lx\n", s, event, mask );
|
||||
|
||||
params.event = event;
|
||||
params.mask = afd_poll_flag_from_win32( mask );
|
||||
|
@ -3167,7 +3169,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
|
|||
{
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %04lx ovl %p trans %p, wait %d flags %p\n",
|
||||
TRACE( "socket %#Ix, overlapped %p, transfer %p, wait %d, flags %p\n",
|
||||
s, lpOverlapped, lpcbTransfer, fWait, lpdwFlags );
|
||||
|
||||
if ( lpOverlapped == NULL )
|
||||
|
@ -3212,7 +3214,7 @@ int WINAPI WSAAsyncSelect( SOCKET s, HWND window, UINT message, LONG mask )
|
|||
IO_STATUS_BLOCK io;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "socket %#lx, window %p, message %#x, mask %#x\n", s, window, message, mask );
|
||||
TRACE( "socket %#Ix, window %p, message %#x, mask %#lx\n", s, window, message, mask );
|
||||
|
||||
params.handle = s;
|
||||
params.window = HandleToULong( window );
|
||||
|
@ -3260,9 +3262,6 @@ SOCKET WINAPI WSASocketA(int af, int type, int protocol,
|
|||
INT len;
|
||||
WSAPROTOCOL_INFOW info;
|
||||
|
||||
TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x\n",
|
||||
af, type, protocol, lpProtocolInfo, g, dwFlags);
|
||||
|
||||
if (!lpProtocolInfo) return WSASocketW(af, type, protocol, NULL, g, dwFlags);
|
||||
|
||||
memcpy(&info, lpProtocolInfo, FIELD_OFFSET(WSAPROTOCOL_INFOW, szProtocol));
|
||||
|
@ -3300,8 +3299,8 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
g, dwFlags except WSA_FLAG_OVERLAPPED) are ignored.
|
||||
*/
|
||||
|
||||
TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x\n",
|
||||
af, type, protocol, lpProtocolInfo, g, flags );
|
||||
TRACE( "family %d, type %d, protocol %d, info %p, group %u, flags %#lx\n",
|
||||
af, type, protocol, lpProtocolInfo, g, flags );
|
||||
|
||||
if (!num_startup)
|
||||
{
|
||||
|
@ -3314,7 +3313,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
if (lpProtocolInfo && lpProtocolInfo->dwServiceFlags4 == 0xff00ff00)
|
||||
{
|
||||
ret = lpProtocolInfo->dwServiceFlags3;
|
||||
TRACE("\tgot duplicate %04lx\n", ret);
|
||||
TRACE( "got duplicate %#Ix\n", ret );
|
||||
if (!socket_list_add(ret))
|
||||
{
|
||||
CloseHandle(SOCKET2HANDLE(ret));
|
||||
|
@ -3371,7 +3370,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
if ((status = NtOpenFile(&handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr,
|
||||
&io, 0, (flags & WSA_FLAG_OVERLAPPED) ? 0 : FILE_SYNCHRONOUS_IO_NONALERT)))
|
||||
{
|
||||
WARN("Failed to create socket, status %#x.\n", status);
|
||||
WARN( "failed to create socket, status %#lx\n", status );
|
||||
WSASetLastError(NtStatusToWSAError(status));
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
@ -3383,7 +3382,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
if ((status = NtDeviceIoControlFile(handle, NULL, NULL, NULL, &io,
|
||||
IOCTL_AFD_WINE_CREATE, &create_params, sizeof(create_params), NULL, 0)))
|
||||
{
|
||||
WARN("Failed to initialize socket, status %#x.\n", status);
|
||||
WARN( "failed to initialize socket, status %#lx\n", status );
|
||||
err = RtlNtStatusToDosError( status );
|
||||
if (err == WSAEACCES) /* raw socket denied */
|
||||
{
|
||||
|
@ -3398,7 +3397,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
}
|
||||
|
||||
ret = HANDLE2SOCKET(handle);
|
||||
TRACE("\tcreated %04lx\n", ret );
|
||||
TRACE( "created %#Ix\n", ret );
|
||||
|
||||
if (!socket_list_add(ret))
|
||||
{
|
||||
|
@ -3434,7 +3433,6 @@ int WINAPI __WSAFDIsSet( SOCKET s, fd_set *set )
|
|||
break;
|
||||
}
|
||||
|
||||
TRACE("(socket %04lx, fd_set %p, count %i) <- %d\n", s, set, set->fd_count, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3535,7 +3533,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct sockaddr *addr, int *addrlen,
|
|||
GROUP group;
|
||||
SOCKET cs;
|
||||
|
||||
TRACE( "socket %#lx, addr %p, addrlen %p, callback %p, context %#lx\n",
|
||||
TRACE( "socket %#Ix, addr %p, addrlen %p, callback %p, context %#Ix\n",
|
||||
s, addr, addrlen, callback, context );
|
||||
|
||||
cs = accept( s, addr, addrlen );
|
||||
|
@ -3617,9 +3615,9 @@ int WINAPI WSADuplicateSocketW( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOW
|
|||
/***********************************************************************
|
||||
* WSAGetQOSByName (WS2_32.41)
|
||||
*/
|
||||
BOOL WINAPI WSAGetQOSByName( SOCKET s, LPWSABUF lpQOSName, LPQOS lpQOS )
|
||||
BOOL WINAPI WSAGetQOSByName( SOCKET s, WSABUF *name, QOS *qos )
|
||||
{
|
||||
FIXME( "(0x%04lx %p %p) Stub!\n", s, lpQOSName, lpQOS );
|
||||
FIXME( "socket %#Ix, name %p, qos %p, stub!\n", s, name, qos );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3627,9 +3625,9 @@ BOOL WINAPI WSAGetQOSByName( SOCKET s, LPWSABUF lpQOSName, LPQOS lpQOS )
|
|||
/***********************************************************************
|
||||
* WSARecvDisconnect (WS2_32.68)
|
||||
*/
|
||||
INT WINAPI WSARecvDisconnect( SOCKET s, LPWSABUF disconnectdata )
|
||||
int WINAPI WSARecvDisconnect( SOCKET s, WSABUF *data )
|
||||
{
|
||||
TRACE( "(%04lx %p)\n", s, disconnectdata );
|
||||
TRACE( "socket %#Ix, data %p\n", s, data );
|
||||
|
||||
return shutdown( s, SD_RECEIVE );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue