usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / php / TSRM / readdir.h
blob0665810c854359ce5d476bdbc6076e6eba014839
1 #ifndef READDIR_H
2 #define READDIR_H
5 /*
6 * Structures and types used to implement opendir/readdir/closedir
7 * on Windows 95/NT.
8 */
10 #include <windows.h>
12 #include <io.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <sys/types.h>
16 #include <direct.h>
18 /* struct dirent - same as Unix */
20 struct dirent {
21 long d_ino; /* inode (always 1 in WIN32) */
22 off_t d_off; /* offset to this dirent */
23 unsigned short d_reclen; /* length of d_name */
24 char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
28 /* typedef DIR - not the same as Unix */
29 typedef struct {
30 HANDLE handle; /* _findfirst/_findnext handle */
31 short offset; /* offset into directory */
32 short finished; /* 1 if there are not more files */
33 WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
34 char *dir; /* the dir we are reading */
35 struct dirent dent; /* the dirent to return */
36 } DIR;
38 /* Function prototypes */
39 DIR *opendir(const char *);
40 struct dirent *readdir(DIR *);
41 int readdir_r(DIR *, struct dirent *, struct dirent **);
42 int closedir(DIR *);
43 int rewinddir(DIR *);
45 #endif /* READDIR_H */