Mercurial > hg > nginx
diff src/core/ngx_cycle.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 | e088695737c3 |
children | d8ee8ef5dcde |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Wed Sep 04 20:48:23 2013 +0400 +++ b/src/core/ngx_cycle.c Wed Sep 04 20:48:28 2013 +0400 @@ -543,7 +543,7 @@ } } - if (nls[n].fd == -1) { + if (nls[n].fd == (ngx_socket_t) -1) { nls[n].open = 1; } } @@ -649,7 +649,7 @@ ls = old_cycle->listening.elts; for (i = 0; i < old_cycle->listening.nelts; i++) { - if (ls[i].remain || ls[i].fd == -1) { + if (ls[i].remain || ls[i].fd == (ngx_socket_t) -1) { continue; } @@ -813,7 +813,7 @@ ls = cycle->listening.elts; for (i = 0; i < cycle->listening.nelts; i++) { - if (ls[i].fd == -1 || !ls[i].open) { + if (ls[i].fd == (ngx_socket_t) -1 || !ls[i].open) { continue; }