Changeset 4408
- Timestamp:
- 10/03/06 10:22:11 (2 years ago)
- Files:
-
- wire/trunk/wire/files.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/trunk/wire/files.c
r4399 r4408 32 32 #include <stdio.h> 33 33 #include <stdlib.h> 34 35 #ifndef __GLIBC__ 34 36 #include <dirent.h> 35 37 #include <glob.h> 38 #endif 39 36 40 #include <readline/readline.h> 37 41 #include <wired/wired.h> … … 53 57 }; 54 58 59 #ifndef __GLIBC__ 55 60 struct _wr_files_glob_dir { 56 61 wi_string_t *path; … … 59 64 }; 60 65 typedef struct _wr_files_glob_dir wr_files_glob_dir_t; 66 #endif 61 67 62 68 63 69 static wi_array_t * wr_files_glob(wi_string_t *); 70 #ifndef __GLIBC__ 64 71 static void * wr_files_glob_opendir(const char *); 65 72 static struct dirent * wr_files_glob_readdir(void *); 66 73 static void wr_files_glob_closedir(void *); 67 74 static int wr_files_glob_stat(const char *, struct stat *); 75 #endif 68 76 69 77 static void wr_file_dealloc(wi_runtime_instance_t *); … … 249 257 250 258 static wi_array_t * wr_files_glob(wi_string_t *pattern) { 259 #ifdef __GLIBC__ 260 return wi_autorelease(wi_array_init_with_data(wi_array_alloc(), pattern, NULL)); 261 #else 251 262 wi_array_t *array; 252 263 glob_t gl; … … 273 284 274 285 return wi_autorelease(array); 275 } 276 277 278 286 #endif 287 } 288 289 290 291 #ifndef __GLIBC__ 279 292 static void * wr_files_glob_opendir(const char *path) { 280 293 wr_files_glob_dir_t *dir; … … 338 351 return 0; 339 352 } 353 #endif 340 354 341 355
