Mercurial > hg > nginx-ranges
comparison src/os/unix/ngx_files.c @ 240:7d7cee0d62e0 NGINX_0_4_5
nginx 0.4.5
*) Bugfix: nginx could not be built on Linux and Solaris; bug appeared
in 0.4.4.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 02 Oct 2006 00:00:00 +0400 |
parents | a528ae0fe909 |
children | c5c2b2883984 |
comparison
equal
deleted
inserted
replaced
239:4f355d4f0cfa | 240:7d7cee0d62e0 |
---|---|
254 | 254 |
255 | 255 |
256 ngx_int_t | 256 ngx_int_t |
257 ngx_open_glob(ngx_glob_t *gl) | 257 ngx_open_glob(ngx_glob_t *gl) |
258 { | 258 { |
259 if (glob((char *) gl->pattern, 0, NULL, &gl->pglob) == 0) { | 259 if (glob((char *) gl->pattern, GLOB_NOSORT, NULL, &gl->pglob) == 0) { |
260 return NGX_OK; | 260 return NGX_OK; |
261 } | 261 } |
262 | 262 |
263 return NGX_ERROR; | 263 return NGX_ERROR; |
264 } | 264 } |
265 | 265 |
266 | 266 |
267 ngx_int_t | 267 ngx_int_t |
268 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) | 268 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) |
269 { | 269 { |
270 if (gl->n < gl->pglob.gl_pathc) { | 270 if (gl->n < (size_t) gl->pglob.gl_pathc) { |
271 | 271 |
272 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); | 272 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); |
273 name->data = (u_char *) gl->pglob.gl_pathv[gl->n]; | 273 name->data = (u_char *) gl->pglob.gl_pathv[gl->n]; |
274 gl->n++; | 274 gl->n++; |
275 | 275 |