Skip to content
Newer
Older
100644 50 lines (37 sloc) 1.13 KB
16017f6 Change header protection macros to conform to standard.
Sascha Schumann authored Jul 2, 2000
1 #ifndef READDIR_H
2 #define READDIR_H
4a1da8b @zsuraski Fix Win32 build
zsuraski authored Jun 4, 2000
3
4
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
5 /*
6 * Structures and types used to implement opendir/readdir/closedir
7 * on Windows 95/NT.
8 */
9
49494be @KalleZ MFH:
KalleZ authored Aug 14, 2008
10 #include <config.w32.h>
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are fa…
Dmitry Stogov authored Nov 10, 2006
11
12 #include <windows.h>
13
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
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 fa…
Dmitry Stogov authored Nov 10, 2006
18 #include <direct.h>
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
19
a6b3682 @fmk Fix win32 build
fmk authored Dec 1, 2006
20 #define php_readdir_r readdir_r
21
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
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 Jun 4, 2000
31
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
32 /* typedef DIR - not the same as Unix */
33 typedef struct {
41c81f2 opendir() is reimplemented using GetFistFile/GetNextFile those are fa…
Dmitry Stogov authored Nov 10, 2006
34 HANDLE handle; /* _findfirst/_findnext handle */
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
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 fa…
Dmitry Stogov authored Nov 10, 2006
37 WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
aceaabc @zsuraski PHP 4.0
zsuraski authored Apr 7, 1999
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 Sep 5, 1999
43 DIR *opendir(const char *);
44 struct dirent *readdir(DIR *);
be6afb3 Add POSIX-like readdir_r for Win32
Sascha Schumann authored May 23, 2000
45 int readdir_r(DIR *, struct dirent *, struct dirent **);
14d9a59 @andigutmans - Make dir functions compile in Win32
andigutmans authored Sep 5, 1999
46 int closedir(DIR *);
0737394 @edinkad Fixed bug #11214 (patch by Steph Fox)
edinkad authored Jul 29, 2002
47 int rewinddir(DIR *);
4a1da8b @zsuraski Fix Win32 build
zsuraski authored Jun 4, 2000
48
16017f6 Change header protection macros to conform to standard.
Sascha Schumann authored Jul 2, 2000
49 #endif /* READDIR_H */
Something went wrong with that request. Please try again.