diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-06-08 17:03:41 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-06-08 17:03:41 +0200 |
| commit | ae496955d23d8c323259c0e090911d6fa3e2c3dc (patch) | |
| tree | a44129a4d0b52def1333cb170a9af5304146d716 /src/fileops.h | |
| parent | 1071c56519866afd41db2f30705eba8406b6a4a1 (diff) | |
| download | libgit2-ae496955d23d8c323259c0e090911d6fa3e2c3dc.tar.gz | |
windows: Fix Symlink issues
Handle Symlinks if they can be handled in Win32. This is not even
compiled. Needs review.
The lstat implementation is modified from core Git.
The readlink implementation is modified from PHP.
Diffstat (limited to 'src/fileops.h')
| -rw-r--r-- | src/fileops.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fileops.h b/src/fileops.h index e20ce6f28..4e6007ad4 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -65,7 +65,6 @@ typedef struct { /* file io buffer */ } gitfo_buf; extern int gitfo_exists(const char *path); -extern int gitfo_shallow_exists(const char *path); extern int gitfo_open(const char *path, int flags); extern int gitfo_creat(const char *path, int mode); extern int gitfo_creat_force(const char *path, int mode); @@ -95,7 +94,14 @@ extern int gitfo_mv_force(const char *from, const char *to); #define gitfo_stat(p,b) stat(p, b) #define gitfo_fstat(f,b) fstat(f, b) -#define gitfo_lstat(p,b) lstat(p,b) + +#ifdef GIT_WIN32 +# define gitfo_lstat(p,b) gitfo_lstat__w32(p,b) +# define gitfo_readlink(a, b, c) gitfo_readlink__w32(a, b, c) +#else +# define gitfo_lstat(p,b) lstat(p,b) +# define gitfo_readlink(a, b, c) readlink(a, b, c) +#endif #define gitfo_unlink(p) unlink(p) #define gitfo_rmdir(p) rmdir(p) |
