Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (37 sloc) 1.16 kb
16017f6 Change header protection macros to conform to standard.
Sascha Schumann authored
1 #ifndef READDIR_H
2 #define READDIR_H
4a1da8b @zsuraski Fix Win32 build
zsuraski authored
3
4
aceaabc @zsuraski PHP 4.0
zsuraski authored
5 /*
6 * Structures and types used to implement opendir/readdir/closedir
7 * on Windows 95/NT.
8 */
9
49494be @KalleZ MFH:
KalleZ authored
10 #include <config.w32.h>
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are faste...
Dmitry Stogov authored
11
12 #include <windows.h>
13
aceaabc @zsuraski PHP 4.0
zsuraski authored
14 #include <io.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <sys/types.h>
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are faste...
Dmitry Stogov authored
18 #include <direct.h>
aceaabc @zsuraski PHP 4.0
zsuraski authored
19
a6b3682 @fmk Fix win32 build
fmk authored
20 #define php_readdir_r readdir_r
21
aceaabc @zsuraski PHP 4.0
zsuraski authored
22 /* struct dirent - same as Unix */
23
24 struct dirent {
25 long d_ino; /* inode (always 1 in WIN32) */
26 off_t d_off; /* offset to this dirent */
27 unsigned short d_reclen; /* length of d_name */
28 char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
29 };
30
4a1da8b @zsuraski Fix Win32 build
zsuraski authored
31
aceaabc @zsuraski PHP 4.0
zsuraski authored
32 /* typedef DIR - not the same as Unix */
33 typedef struct {
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are faste...
Dmitry Stogov authored
34 HANDLE handle; /* _findfirst/_findnext handle */
aceaabc @zsuraski PHP 4.0
zsuraski authored
35 short offset; /* offset into directory */
36 short finished; /* 1 if there are not more files */
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are faste...
Dmitry Stogov authored
37 WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
aceaabc @zsuraski PHP 4.0
zsuraski authored
38 char *dir; /* the dir we are reading */
39 struct dirent dent; /* the dirent to return */
40 } DIR;
41
42 /* Function prototypes */
14d9a59 @andigutmans - Make dir functions compile in Win32
andigutmans authored
43 DIR *opendir(const char *);
44 struct dirent *readdir(DIR *);
be6afb3 Add POSIX-like readdir_r for Win32
Sascha Schumann authored
45 int readdir_r(DIR *, struct dirent *, struct dirent **);
14d9a59 @andigutmans - Make dir functions compile in Win32
andigutmans authored
46 int closedir(DIR *);
0737394 Fixed bug #11214 (patch by Steph Fox)
Edin Kadribasic authored
47 int rewinddir(DIR *);
4a1da8b @zsuraski Fix Win32 build
zsuraski authored
48
16017f6 Change header protection macros to conform to standard.
Sascha Schumann authored
49 #endif /* READDIR_H */
Something went wrong with that request. Please try again.