comparison src/core/ngx_resolver.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 063ac68d89dc
children 5c410d6ca7dd
comparison
equal deleted inserted replaced
5359:2fda9065d0f4 5360:3d2d3e1cf427
2219 2219
2220 s = ngx_socket(uc->sockaddr->sa_family, SOCK_DGRAM, 0); 2220 s = ngx_socket(uc->sockaddr->sa_family, SOCK_DGRAM, 0);
2221 2221
2222 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &uc->log, 0, "UDP socket %d", s); 2222 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &uc->log, 0, "UDP socket %d", s);
2223 2223
2224 if (s == -1) { 2224 if (s == (ngx_socket_t) -1) {
2225 ngx_log_error(NGX_LOG_ALERT, &uc->log, ngx_socket_errno, 2225 ngx_log_error(NGX_LOG_ALERT, &uc->log, ngx_socket_errno,
2226 ngx_socket_n " failed"); 2226 ngx_socket_n " failed");
2227 return NGX_ERROR; 2227 return NGX_ERROR;
2228 } 2228 }
2229 2229