From 6947328d6b12076fe2a65167eb17fdeeb7044e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 10 Aug 2016 13:10:30 +0100 Subject: [PATCH] win: remove types already defined in MinGW-w64 PR-URL: https://github.com/libuv/libuv/pull/990 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- include/uv-win.h | 72 ----------------------------------------------- src/win/winsock.h | 16 ----------- test/runner-win.c | 9 ------ 3 files changed, 97 deletions(-) diff --git a/include/uv-win.h b/include/uv-win.h index 94ef3495..c41d7aa9 100644 --- a/include/uv-win.h +++ b/include/uv-win.h @@ -78,78 +78,6 @@ typedef intptr_t ssize_t; # define SIGABRT_COMPAT 6 #endif -/* - * Guids and typedefs for winsock extension functions - * Mingw32 doesn't have these :-( - */ -#ifndef WSAID_ACCEPTEX -# define WSAID_ACCEPTEX \ - {0xb5367df1, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_CONNECTEX \ - {0x25a207b9, 0xddf3, 0x4660, \ - {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}} - -# define WSAID_GETACCEPTEXSOCKADDRS \ - {0xb5367df2, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_DISCONNECTEX \ - {0x7fda2e11, 0x8630, 0x436f, \ - {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}} - -# define WSAID_TRANSMITFILE \ - {0xb5367df0, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - - typedef BOOL PASCAL (*LPFN_ACCEPTEX) - (SOCKET sListenSocket, - SOCKET sAcceptSocket, - PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPDWORD lpdwBytesReceived, - LPOVERLAPPED lpOverlapped); - - typedef BOOL PASCAL (*LPFN_CONNECTEX) - (SOCKET s, - const struct sockaddr* name, - int namelen, - PVOID lpSendBuffer, - DWORD dwSendDataLength, - LPDWORD lpdwBytesSent, - LPOVERLAPPED lpOverlapped); - - typedef void PASCAL (*LPFN_GETACCEPTEXSOCKADDRS) - (PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPSOCKADDR* LocalSockaddr, - LPINT LocalSockaddrLength, - LPSOCKADDR* RemoteSockaddr, - LPINT RemoteSockaddrLength); - - typedef BOOL PASCAL (*LPFN_DISCONNECTEX) - (SOCKET hSocket, - LPOVERLAPPED lpOverlapped, - DWORD dwFlags, - DWORD reserved); - - typedef BOOL PASCAL (*LPFN_TRANSMITFILE) - (SOCKET hSocket, - HANDLE hFile, - DWORD nNumberOfBytesToWrite, - DWORD nNumberOfBytesPerSend, - LPOVERLAPPED lpOverlapped, - LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, - DWORD dwFlags); - - typedef PVOID RTL_SRWLOCK; - typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; -#endif typedef int (WSAAPI* LPFN_WSARECV) (SOCKET socket, diff --git a/src/win/winsock.h b/src/win/winsock.h index 85574321..2621c892 100644 --- a/src/win/winsock.h +++ b/src/win/winsock.h @@ -34,26 +34,10 @@ /* * MinGW is missing these too */ -#ifndef SO_UPDATE_CONNECT_CONTEXT -# define SO_UPDATE_CONNECT_CONTEXT 0x7010 -#endif - #ifndef TCP_KEEPALIVE # define TCP_KEEPALIVE 3 #endif -#ifndef IPV6_V6ONLY -# define IPV6_V6ONLY 27 -#endif - -#ifndef IPV6_HOPLIMIT -# define IPV6_HOPLIMIT 21 -#endif - -#ifndef SIO_BASE_HANDLE -# define SIO_BASE_HANDLE 0x48000022 -#endif - /* * TDI defines that are only in the DDK. * We only need receive flags so far. diff --git a/test/runner-win.c b/test/runner-win.c index f8105a2a..6d12eabd 100644 --- a/test/runner-win.c +++ b/test/runner-win.c @@ -31,15 +31,6 @@ #include "runner.h" -/* - * Define the stuff that MinGW doesn't have - */ -#ifndef GetFileSizeEx - WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE hFile, - PLARGE_INTEGER lpFileSize); -#endif - - /* Do platform-specific initialization. */ int platform_init(int argc, char **argv) { /* Disable the "application crashed" popup. */