# [PATCH 2/2] MinGW: Add missing file mode bit defines

3 messages from 2009-12-29 to 2009-12-30. Participants: Sebastian Schuberth, Johannes Sixt.
Thread: https://gitlist.dev/t/22046

## Sebastian Schuberth, 2009-12-29 01:19

Subject: [PATCH 2/2] MinGW: Add missing file mode bit defines
Message-ID: <hhblfa$di8$2@ger.gmane.org>
URL: https://gitlist.dev/e/hhblfa%24di8%242%40ger.gmane.org

```
MinGW: Add missing file mode bit defines

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 compat/mingw.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/compat/mingw.h b/compat/mingw.h
index af2f810..885be51 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -12,12 +12,24 @@ typedef int uid_t;
 #define S_IFLNK    0120000 /* Symbolic link */
 #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
 #define S_ISSOCK(x) 0
+
+#ifndef _STAT_H_
+#define S_IRUSR 0
+#define S_IWUSR 0
+#define S_IXUSR 0
+#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#endif
 #define S_IRGRP 0
 #define S_IWGRP 0
 #define S_IXGRP 0
-#define S_ISGID 0
+#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
 #define S_IROTH 0
+#define S_IWOTH 0
 #define S_IXOTH 0
+#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#define S_ISUID 0
+#define S_ISGID 0
+#define S_ISVTX 0
 
 #define WIFEXITED(x) 1
 #define WIFSIGNALED(x) 0
-- 
1.6.5.rc2.13.g1be2

```

## Johannes Sixt, 2009-12-29 21:10

Subject: Re: [PATCH 2/2] MinGW: Add missing file mode bit defines
Message-ID: <4B3A702C.5040408@kdbg.org>
URL: https://gitlist.dev/e/4B3A702C.5040408%40kdbg.org
In-Reply-To: <hhblfa$di8$2@ger.gmane.org>

```
Sebastian Schuberth schrieb:
> MinGW: Add missing file mode bit defines

Why this? What's the problem with the status quo?

-- Hannes

```

## Sebastian Schuberth, 2009-12-30 00:51

Subject: Re: [PATCH 2/2] MinGW: Add missing file mode bit defines
Message-ID: <bdca99240912291651j6d67040et5151096416ab4bd6@mail.gmail.com>
URL: https://gitlist.dev/e/bdca99240912291651j6d67040et5151096416ab4bd6%40mail.gmail.com
In-Reply-To: <4B3A702C.5040408@kdbg.org>

```
>> MinGW: Add missing file mode bit defines
>
> Why this? What's the problem with the status quo?

Same here as for the "Use pid_t more consequently" patch, hd2u
required one of the missing defines to compile for msysGit.

-- 
Sebastian Schuberth

```
