Mercurial > hg > nginx
comparison src/event/ngx_event_pipe.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 | 011d72dea802 |
children | e7b3b9855be8 |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
55 } | 55 } |
56 | 56 |
57 do_write = 1; | 57 do_write = 1; |
58 } | 58 } |
59 | 59 |
60 if (p->upstream->fd != -1) { | 60 if (p->upstream->fd != (ngx_socket_t) -1) { |
61 rev = p->upstream->read; | 61 rev = p->upstream->read; |
62 | 62 |
63 flags = (rev->eof || rev->error) ? NGX_CLOSE_EVENT : 0; | 63 flags = (rev->eof || rev->error) ? NGX_CLOSE_EVENT : 0; |
64 | 64 |
65 if (ngx_handle_read_event(rev, flags) != NGX_OK) { | 65 if (ngx_handle_read_event(rev, flags) != NGX_OK) { |
72 } else if (rev->timer_set) { | 72 } else if (rev->timer_set) { |
73 ngx_del_timer(rev); | 73 ngx_del_timer(rev); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 if (p->downstream->fd != -1 && p->downstream->data == p->output_ctx) { | 77 if (p->downstream->fd != (ngx_socket_t) -1 |
78 && p->downstream->data == p->output_ctx) | |
79 { | |
78 wev = p->downstream->write; | 80 wev = p->downstream->write; |
79 if (ngx_handle_write_event(wev, p->send_lowat) != NGX_OK) { | 81 if (ngx_handle_write_event(wev, p->send_lowat) != NGX_OK) { |
80 return NGX_ABORT; | 82 return NGX_ABORT; |
81 } | 83 } |
82 | 84 |