comparison src/os/win32/ngx_socket.h @ 6230:2a621245f4cf

Win32: MSVC 2015 compatibility. Resolved warnings about declarations that hide previous local declarations. Warnings about WSASocketA() being deprecated resolved by explicit use of WSASocketW() instead of WSASocket(). When compiling without IPv6 support, WinSock deprecated warnings are disabled to allow use of gethostbyname().
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 17 Aug 2015 18:09:17 +0300
parents d620f497c50f
children 4089b3d2cb59
comparison
equal deleted inserted replaced
6229:2c045e5b8291 6230:2a621245f4cf
19 typedef SOCKET ngx_socket_t; 19 typedef SOCKET ngx_socket_t;
20 typedef int socklen_t; 20 typedef int socklen_t;
21 21
22 22
23 #define ngx_socket(af, type, proto) \ 23 #define ngx_socket(af, type, proto) \
24 WSASocket(af, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED) 24 WSASocketW(af, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED)
25 25
26 #define ngx_socket_n "WSASocket()" 26 #define ngx_socket_n "WSASocketW()"
27 27
28 int ngx_nonblocking(ngx_socket_t s); 28 int ngx_nonblocking(ngx_socket_t s);
29 int ngx_blocking(ngx_socket_t s); 29 int ngx_blocking(ngx_socket_t s);
30 30
31 #define ngx_nonblocking_n "ioctlsocket(FIONBIO)" 31 #define ngx_nonblocking_n "ioctlsocket(FIONBIO)"