aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-01-15 14:24:29 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-15 14:01:10 -0800
commit59de49f80d8f6067f19496750cc79632b2959ad9 (patch)
tree9655aecd6745182d76a2d8ffcd1f4c0bc088713d /compat
parent466931d9e10017aca5548f23e3efbcb3063d3c34 (diff)
downloadgit-59de49f80d8f6067f19496750cc79632b2959ad9.tar.gz
git-59de49f80d8f6067f19496750cc79632b2959ad9.tar.xz
mingw: avoid redefining S_* constants
When compiling with MSys2's compiler, these constants are already defined. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 10e2e4cac..093a9771b 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -26,14 +26,18 @@ typedef int pid_t;
#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(x) 0
+#ifndef S_IRWXG
#define S_IRGRP 0
#define S_IWGRP 0
#define S_IXGRP 0
#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#endif
+#ifndef S_IRWXO
#define S_IROTH 0
#define S_IWOTH 0
#define S_IXOTH 0
#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif
#define S_ISUID 0004000
#define S_ISGID 0002000