Skip to content

Commit 7a6436e

Browse files
committed
mingw: avoid redefining S_* constants
When compiling with MSys2's compiler, these constants are already defined. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e728530 commit 7a6436e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compat/mingw.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ typedef int pid_t;
2626
#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
2727
#define S_ISSOCK(x) 0
2828

29+
#ifndef S_IRWXG
2930
#define S_IRGRP 0
3031
#define S_IWGRP 0
3132
#define S_IXGRP 0
3233
#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
34+
#endif
35+
#ifndef S_IRWXO
3336
#define S_IROTH 0
3437
#define S_IWOTH 0
3538
#define S_IXOTH 0
3639
#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
40+
#endif
3741

3842
#define S_ISUID 0004000
3943
#define S_ISGID 0002000

0 commit comments

Comments
 (0)