comparison src/core/ngx_log.c @ 2389:ad08367a257b

compact win32 errno logging
author Igor Sysoev <igor@sysoev.ru>
date Tue, 09 Dec 2008 17:41:17 +0000
parents 2abf14c952a2
children 6fd7d9c3218d
comparison
equal deleted inserted replaced
2388:722b5aff05ae 2389:ad08367a257b
125 *p++ = '.'; 125 *p++ = '.';
126 *p++ = '.'; 126 *p++ = '.';
127 } 127 }
128 128
129 #if (NGX_WIN32) 129 #if (NGX_WIN32)
130 130 p = ngx_snprintf(p, last - p, ((unsigned) err < 0x80000000)
131 if ((unsigned) err >= 0x80000000) { 131 ? " (%d: " : " (%Xd: ", err);
132 p = ngx_snprintf(p, last - p, " (%Xd: ", err);
133
134 } else {
135 p = ngx_snprintf(p, last - p, " (%d: ", err);
136 }
137
138 #else 132 #else
139
140 p = ngx_snprintf(p, last - p, " (%d: ", err); 133 p = ngx_snprintf(p, last - p, " (%d: ", err);
141
142 #endif 134 #endif
143 135
144 p = ngx_strerror_r(err, p, last - p); 136 p = ngx_strerror_r(err, p, last - p);
145 137
146 if (p < last) { 138 if (p < last) {