comparison src/os/unix/ngx_files.c @ 735:72621ebef255

fix building on Linux and Solaris
author Igor Sysoev <igor@sysoev.ru>
date Mon, 02 Oct 2006 14:50:19 +0000
parents 532d15ddbe68
children bb139aba3199
comparison
equal deleted inserted replaced
734:d8615f90445e 735:72621ebef255
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