Mercurial > hg > nginx
diff src/os/win32/ngx_process_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 | 8a9b7b4e9f2d |
children | b7bf4671bb7b |
line wrap: on
line diff
--- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c @@ -815,7 +815,7 @@ ngx_worker_thread(void *data) /* THREAD: lock */ - if (c[i].fd != -1 && c[i].idle) { + if (c[i].fd != (ngx_socket_t) -1 && c[i].idle) { c[i].close = 1; c[i].read->handler(c[i].read); } @@ -874,7 +874,7 @@ ngx_worker_process_exit(ngx_cycle_t *cyc if (ngx_exiting) { c = cycle->connections; for (i = 0; i < cycle->connection_n; i++) { - if (c[i].fd != -1 + if (c[i].fd != (ngx_socket_t) -1 && c[i].read && !c[i].read->accept && !c[i].read->channel