diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-11-10 11:20:58 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-11-10 11:20:58 +0000 |
commit | a68d5f0a89cfde3d6ed3dd30174e84f40e80eab1 (patch) | |
tree | 6a364f8c8d4cfffca66223d9b8f64db62b2c324b /win32/readdir.h | |
parent | b71309f4a2a6058225fdc0e1cc83c0104f02d4e9 (diff) | |
download | php-git-a68d5f0a89cfde3d6ed3dd30174e84f40e80eab1.tar.gz |
opendir() is reimplemented using GetFistFile/GetNextFile those are faster then _findfirst/_findnext
Diffstat (limited to 'win32/readdir.h')
-rw-r--r-- | win32/readdir.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/win32/readdir.h b/win32/readdir.h index 419dc95c24..139bc7bb70 100644 --- a/win32/readdir.h +++ b/win32/readdir.h @@ -7,11 +7,15 @@ * on Windows 95/NT. */ +#define _WIN32_WINNT 0x0400 + +#include <windows.h> + #include <io.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> - +#include <direct.h> /* struct dirent - same as Unix */ @@ -25,10 +29,10 @@ struct dirent { /* typedef DIR - not the same as Unix */ typedef struct { - long handle; /* _findfirst/_findnext handle */ + HANDLE handle; /* _findfirst/_findnext handle */ short offset; /* offset into directory */ short finished; /* 1 if there are not more files */ - struct _finddata_t fileinfo; /* from _findfirst/_findnext */ + WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */ char *dir; /* the dir we are reading */ struct dirent dent; /* the dirent to return */ } DIR; |