Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_files.c @ 2199:ffb512f0eabd
fix building on FreeBSD prior to 4.8, it has no GLOB_NOMATCH
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 22 Aug 2008 12:54:32 +0000 |
parents | 25add486e7aa |
children | 2cae41e51622 |
comparison
equal
deleted
inserted
replaced
2198:5975975eedc0 | 2199:ffb512f0eabd |
---|---|
263 | 263 |
264 if (n == 0) { | 264 if (n == 0) { |
265 return NGX_OK; | 265 return NGX_OK; |
266 } | 266 } |
267 | 267 |
268 #ifdef GLOB_NOMATCH | |
269 | |
268 if (n == GLOB_NOMATCH && gl->test) { | 270 if (n == GLOB_NOMATCH && gl->test) { |
269 return NGX_OK; | 271 return NGX_OK; |
270 } | 272 } |
271 | 273 |
274 #endif | |
275 | |
272 return NGX_ERROR; | 276 return NGX_ERROR; |
273 } | 277 } |
274 | 278 |
275 | 279 |
276 ngx_int_t | 280 ngx_int_t |
277 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) | 281 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) |
278 { | 282 { |
279 if (gl->n < (size_t) gl->pglob.gl_pathc) { | 283 if (gl->n < (size_t) gl->pglob.gl_matchc) { |
280 | 284 |
281 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); | 285 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); |
282 name->data = (u_char *) gl->pglob.gl_pathv[gl->n]; | 286 name->data = (u_char *) gl->pglob.gl_pathv[gl->n]; |
283 gl->n++; | 287 gl->n++; |
284 | 288 |