1 #ifndef READDIR_H 2 #define READDIR_H 3 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * Structures and types used to implement opendir/readdir/closedir 11 * on Windows 95/NT. 12 */ 13 14 #include <config.w32.h> 15 16 #include <stdlib.h> 17 #include <sys/types.h> 18 19 #define php_readdir_r readdir_r 20 21 /* struct dirent - same as Unix */ 22 struct dirent { 23 long d_ino; /* inode (always 1 in WIN32) */ 24 off_t d_off; /* offset to this dirent */ 25 unsigned short d_reclen; /* length of d_name */ 26 char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */ 27 }; 28 29 /* typedef DIR - not the same as Unix */ 30 typedef struct DIR_W32 DIR; 31 32 /* Function prototypes */ 33 DIR *opendir(const char *); 34 struct dirent *readdir(DIR *); 35 int readdir_r(DIR *, struct dirent *, struct dirent **); 36 int closedir(DIR *); 37 int rewinddir(DIR *); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* READDIR_H */ 44