diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
| commit | 48d96ced6ff6cea533d56d0d09129f6632a19e4d (patch) | |
| tree | f3196223e3dd9173aaf91dff959498799c0e3ea2 /src/event/ngx_event_pipe.c | |
| parent | 74b7a910137a99b5fb073e7c27858c019f96a8cc (diff) | |
| download | nginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.tar.gz nginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.tar.bz2 | |
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.
Diffstat (limited to 'src/event/ngx_event_pipe.c')
| -rw-r--r-- | src/event/ngx_event_pipe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c index 4ef9b7103..6f685a9ed 100644 --- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -57,7 +57,7 @@ ngx_event_pipe(ngx_event_pipe_t *p, ngx_int_t do_write) do_write = 1; } - if (p->upstream->fd != -1) { + if (p->upstream->fd != (ngx_socket_t) -1) { rev = p->upstream->read; flags = (rev->eof || rev->error) ? NGX_CLOSE_EVENT : 0; @@ -74,7 +74,9 @@ ngx_event_pipe(ngx_event_pipe_t *p, ngx_int_t do_write) } } - if (p->downstream->fd != -1 && p->downstream->data == p->output_ctx) { + if (p->downstream->fd != (ngx_socket_t) -1 + && p->downstream->data == p->output_ctx) + { wev = p->downstream->write; if (ngx_handle_write_event(wev, p->send_lowat) != NGX_OK) { return NGX_ABORT; |
