Mercurial > hg > nginx
comparison src/event/ngx_event_acceptex.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 | 05ba5bce31e0 |
children | 1ab1cf63f885 |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
106 s = ngx_socket(ls->sockaddr->sa_family, ls->type, 0); | 106 s = ngx_socket(ls->sockaddr->sa_family, ls->type, 0); |
107 | 107 |
108 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &ls->log, 0, | 108 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &ls->log, 0, |
109 ngx_socket_n " s:%d", s); | 109 ngx_socket_n " s:%d", s); |
110 | 110 |
111 if (s == -1) { | 111 if (s == (ngx_socket_t) -1) { |
112 ngx_log_error(NGX_LOG_ALERT, &ls->log, ngx_socket_errno, | 112 ngx_log_error(NGX_LOG_ALERT, &ls->log, ngx_socket_errno, |
113 ngx_socket_n " failed"); | 113 ngx_socket_n " failed"); |
114 | 114 |
115 return NGX_ERROR; | 115 return NGX_ERROR; |
116 } | 116 } |