diff options
author | Russell Belfer <rb@github.com> | 2012-11-14 22:41:51 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-11-14 22:41:51 -0800 |
commit | cccacac555ed3937204f8dfd397bc92e499d2c42 (patch) | |
tree | f2dbc74e6a27f330156d94e407307a954d6cbb37 /src/unix | |
parent | a277345e05507dfa0a3350d47df96d37063c929f (diff) | |
download | libgit2-cccacac555ed3937204f8dfd397bc92e499d2c42.tar.gz |
Add POSIX compat lstat() variant for win32
The existing p_lstat implementation on win32 is not quite POSIX
compliant when setting errno to ENOTDIR. This adds an option to
make is be compliant so that code (such as checkout) that cares
to have separate behavior for ENOTDIR can use it portably.
This also contains a couple of other minor cleanups in the
posix_w32.c implementations to avoid unnecessary work.
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/posix.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unix/posix.h b/src/unix/posix.h index f6f2e2353..6980c36f1 100644 --- a/src/unix/posix.h +++ b/src/unix/posix.h @@ -23,4 +23,7 @@ #define p_setenv(n,v,o) setenv(n,v,o) #define p_inet_pton(a, b, c) inet_pton(a, b, c) +/* see win32/posix.h for explanation about why this exists */ +#define p_lstat_posixly(p,b) lstat(p,b) + #endif |