diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2009-03-20 19:52:50 +0000 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2009-03-20 14:39:03 -0700 |
| commit | 0234c186bacb5144ca13f69f0dc9bfcc8ec7a075 (patch) | |
| tree | c770eeb29c9c95d27b9df2d30b6f47d62e78d07b /src/dir.h | |
| parent | 79ca2edcd4e7a801400fa33c2c705b8f03a5d7f5 (diff) | |
| download | libgit2-0234c186bacb5144ca13f69f0dc9bfcc8ec7a075.tar.gz | |
win32: Add <dirent.h> directory reading routines
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/dir.h')
| -rw-r--r-- | src/dir.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/dir.h b/src/dir.h new file mode 100644 index 000000000..62ee0b899 --- /dev/null +++ b/src/dir.h @@ -0,0 +1,32 @@ +#ifndef INCLUDE_dir_h__ +#define INCLUDE_dir_h__ + +#include "common.h" + +#ifndef GIT_WIN32 +# include <dirent.h> +#endif + +#ifdef GIT_WIN32 + +struct dirent { + int d_ino; + char d_name[261]; +}; + +typedef struct { + HANDLE h; + WIN32_FIND_DATA f; + struct dirent entry; + char *dir; + int first; +} DIR; + +extern DIR *opendir(const char *); +extern struct dirent *readdir(DIR *); +extern void rewinddir(DIR *); +extern int closedir(DIR *); + +#endif + +#endif /* INCLUDE_dir_h__ */ |
