]>
Commit | Line | Data |
---|---|---|
bb742ede | 1 | /* |
359fc2d2 | 2 | * Copyright (C) the libgit2 contributors. All rights reserved. |
bb742ede VM |
3 | * |
4 | * This file is part of libgit2, distributed under the GNU GPL v2 with | |
5 | * a Linking Exception. For full terms see the included COPYING file. | |
6 | */ | |
eae0bfdc PP |
7 | #ifndef INCLUDE_win32_dir_h__ |
8 | #define INCLUDE_win32_dir_h__ | |
0234c186 RJ |
9 | |
10 | #include "common.h" | |
eae0bfdc | 11 | |
c2c81615 | 12 | #include "w32_util.h" |
0234c186 | 13 | |
e97179b6 | 14 | struct git__dirent { |
87d9869f | 15 | int d_ino; |
c2c81615 | 16 | git_win32_utf8_path d_name; |
0234c186 RJ |
17 | }; |
18 | ||
19 | typedef struct { | |
20 | HANDLE h; | |
6d0ef974 | 21 | WIN32_FIND_DATAW f; |
e97179b6 | 22 | struct git__dirent entry; |
0234c186 | 23 | int first; |
ee065601 | 24 | char dir[GIT_FLEX_ARRAY]; |
e97179b6 RJ |
25 | } git__DIR; |
26 | ||
e035685f VM |
27 | extern git__DIR *git__opendir(const char *); |
28 | extern struct git__dirent *git__readdir(git__DIR *); | |
74fa4bfa RB |
29 | extern int git__readdir_ext( |
30 | git__DIR *, struct git__dirent *, struct git__dirent **, int *); | |
e035685f VM |
31 | extern void git__rewinddir(git__DIR *); |
32 | extern int git__closedir(git__DIR *); | |
e97179b6 RJ |
33 | |
34 | # ifndef GIT__WIN32_NO_WRAP_DIR | |
87d9869f VM |
35 | # define dirent git__dirent |
36 | # define DIR git__DIR | |
37 | # define opendir git__opendir | |
38 | # define readdir git__readdir | |
74fa4bfa | 39 | # define readdir_r(d,e,r) git__readdir_ext((d),(e),(r),NULL) |
87d9869f VM |
40 | # define rewinddir git__rewinddir |
41 | # define closedir git__closedir | |
e97179b6 | 42 | # endif |
0234c186 | 43 | |
eae0bfdc | 44 | #endif |