Mercurial > hg > nginx-quic
comparison src/event/modules/ngx_win32_select_module.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 | d620f497c50f |
children | 3377f9459e99 |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
146 "invalid select %s event fd:%d ev:%i", | 146 "invalid select %s event fd:%d ev:%i", |
147 ev->write ? "write" : "read", c->fd, event); | 147 ev->write ? "write" : "read", c->fd, event); |
148 return NGX_ERROR; | 148 return NGX_ERROR; |
149 } | 149 } |
150 | 150 |
151 if ((event == NGX_READ_EVENT) && (max_read >= FD_SETSIZE) | 151 if ((event == NGX_READ_EVENT && max_read >= FD_SETSIZE) |
152 || (event == NGX_WRITE_EVENT) && (max_write >= FD_SETSIZE)) | 152 || (event == NGX_WRITE_EVENT && max_write >= FD_SETSIZE)) |
153 { | 153 { |
154 ngx_log_error(NGX_LOG_ERR, ev->log, 0, | 154 ngx_log_error(NGX_LOG_ERR, ev->log, 0, |
155 "maximum number of descriptors " | 155 "maximum number of descriptors " |
156 "supported by select() is %d", FD_SETSIZE); | 156 "supported by select() is %d", FD_SETSIZE); |
157 return NGX_ERROR; | 157 return NGX_ERROR; |