Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
813 | 813 |
814 for (i = 0; i < cycle->connection_n; i++) { | 814 for (i = 0; i < cycle->connection_n; i++) { |
815 | 815 |
816 /* THREAD: lock */ | 816 /* THREAD: lock */ |
817 | 817 |
818 if (c[i].fd != -1 && c[i].idle) { | 818 if (c[i].fd != (ngx_socket_t) -1 && c[i].idle) { |
819 c[i].close = 1; | 819 c[i].close = 1; |
820 c[i].read->handler(c[i].read); | 820 c[i].read->handler(c[i].read); |
821 } | 821 } |
822 } | 822 } |
823 | 823 |
872 } | 872 } |
873 | 873 |
874 if (ngx_exiting) { | 874 if (ngx_exiting) { |
875 c = cycle->connections; | 875 c = cycle->connections; |
876 for (i = 0; i < cycle->connection_n; i++) { | 876 for (i = 0; i < cycle->connection_n; i++) { |
877 if (c[i].fd != -1 | 877 if (c[i].fd != (ngx_socket_t) -1 |
878 && c[i].read | 878 && c[i].read |
879 && !c[i].read->accept | 879 && !c[i].read->accept |
880 && !c[i].read->channel | 880 && !c[i].read->channel |
881 && !c[i].read->resolver) | 881 && !c[i].read->resolver) |
882 { | 882 { |