git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] mingw: avoid redefining S_* constants

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 15, 2016, 13:24 UTC
Message-ID
<0049b80c17e14722a217d208e0400975c4d0a024.1452864241.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1452864241.git.johannes.schindelin@gmx.de>
When compiling with MSys2's compiler, these constants are already defined.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 compat/mingw.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index b3e5044..3a404ff 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -14,14 +14,18 @@ typedef int socklen_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
-- 
2.7.0.windows.1.7.g55a05c8
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 7 in “Fix compile warnings with MSys2's compiler”
  1. 0/4 Fix compile warnings with MSys2's compilerJohannes Schindelin, Jan 15, 2016
  2. 1/4 mingw: avoid redefining S_* constantsJohannes Schindelin, Jan 15, 2016
  3. 2/4 mingw: avoid warnings when casting HANDLEs to intJohannes Schindelin, Jan 15, 2016
  4. 3/4 mingw: squash another warning about a castJohannes Schindelin, Jan 15, 2016
  5. 4/4 mingw: uglify (a, 0) definitions to shut up warningsJohannes Schindelin, Jan 15, 2016
  6. Junio C HamanoJan 15, 2016
  7. Johannes SchindelinJan 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.