diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-13 20:01:11 +0000 |
|---|---|---|
| committer | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-20 20:16:34 +0000 |
| commit | e97179b6de293c8f288957dc556239a44fa52e3e (patch) | |
| tree | 4870103f0d85d833fafcac9f3eea8b17f9151125 /src/win32 | |
| parent | 90d4d2f0fc362beabbbf76b4ffda0828229c198d (diff) | |
| download | libgit2-e97179b6de293c8f288957dc556239a44fa52e3e.tar.gz | |
win32: Add a 'git__' prefix to the directory reading routines
This reduces the global namespace pollution and allows for
a win32 compiler (eg. Open Watcom) to provide these routines
in a header other than <dirent.h> (eg in <io.h>).
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'src/win32')
| -rw-r--r-- | src/win32/dir.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/win32/dir.c b/src/win32/dir.c index a43ff6394..069a41c3a 100644 --- a/src/win32/dir.c +++ b/src/win32/dir.c @@ -1,3 +1,4 @@ +#define GIT__WIN32_NO_WRAP_DIR #include "dir.h" static int init_filter(char *filter, size_t n, const char *dir) @@ -15,10 +16,10 @@ static int init_filter(char *filter, size_t n, const char *dir) return 1; } -DIR *opendir(const char *dir) +git__DIR *git__opendir(const char *dir) { char filter[4096]; - DIR *new; + git__DIR *new; if (!dir || !init_filter(filter, sizeof(filter), dir)) return NULL; @@ -45,7 +46,7 @@ DIR *opendir(const char *dir) return new; } -struct dirent *readdir(DIR *d) +struct git__dirent *git__readdir(git__DIR *d) { if (!d || d->h == INVALID_HANDLE_VALUE) return NULL; @@ -66,7 +67,7 @@ struct dirent *readdir(DIR *d) return &d->entry; } -void rewinddir(DIR *d) +void git__rewinddir(git__DIR *d) { char filter[4096]; @@ -83,7 +84,7 @@ void rewinddir(DIR *d) } } -int closedir(DIR *d) +int git__closedir(git__DIR *d) { if (d) { if (d->h != INVALID_HANDLE_VALUE) |
