Mercurial > hg > nginx
comparison src/os/win32/ngx_win32_init.c @ 5360:3d2d3e1cf427
Win32: MinGW GCC compatibility.
Several warnings silenced, notably (ngx_socket_t) -1 is now checked
on socket operations instead of -1, as ngx_socket_t is unsigned on win32
and gcc complains on comparison.
With this patch, it's now possible to compile nginx using mingw gcc,
with options we normally compile on win32.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 04 Sep 2013 20:48:28 +0400 |
parents | 555ca31dea18 |
children | b91bcba29351 |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
139 * get AcceptEx(), GetAcceptExSockAddrs(), TransmitFile(), | 139 * get AcceptEx(), GetAcceptExSockAddrs(), TransmitFile(), |
140 * TransmitPackets(), ConnectEx(), and DisconnectEx() addresses | 140 * TransmitPackets(), ConnectEx(), and DisconnectEx() addresses |
141 */ | 141 */ |
142 | 142 |
143 s = ngx_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); | 143 s = ngx_socket(AF_INET, SOCK_STREAM, IPPROTO_IP); |
144 if (s == -1) { | 144 if (s == (ngx_socket_t) -1) { |
145 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, | 145 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, |
146 ngx_socket_n " falied"); | 146 ngx_socket_n " falied"); |
147 return NGX_ERROR; | 147 return NGX_ERROR; |
148 } | 148 } |
149 | 149 |