Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/unix
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-11-15 10:41:51 +0400
committerRussell Belfer <rb@github.com>2012-11-15 10:41:51 +0400
commitcccacac555ed3937204f8dfd397bc92e499d2c42 (patch)
treef2dbc74e6a27f330156d94e407307a954d6cbb37 /src/unix
parenta277345e05507dfa0a3350d47df96d37063c929f (diff)
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.h3
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