[Lldb-commits] [PATCH] D67910: [LLDB] Avoid warnings about redefining posix mode defines on MinGW

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 23 05:19:57 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: hhb, amccarth, labath.
Herald added subscribers: JDevlieghere, abidh.
Herald added a project: LLDB.

Since these defines were added in LLVM SVN r189364 in 2013, mingw-w64 got defines for S_I?GRP, S_IRWXG, S_I?OTH and S_IRWXO in 2015.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D67910

Files:
  lldb/include/lldb/Host/windows/PosixApi.h


Index: lldb/include/lldb/Host/windows/PosixApi.h
===================================================================
--- lldb/include/lldb/Host/windows/PosixApi.h
+++ lldb/include/lldb/Host/windows/PosixApi.h
@@ -36,15 +36,25 @@
 #define S_IWUSR S_IWRITE /* write, user */
 #define S_IXUSR 0        /* execute, user */
 #endif
+#ifndef S_IRGRP
 #define S_IRGRP 0 /* read, group */
 #define S_IWGRP 0 /* write, group */
 #define S_IXGRP 0 /* execute, group */
+#endif
+#ifndef S_IROTH
 #define S_IROTH 0 /* read, others */
 #define S_IWOTH 0 /* write, others */
 #define S_IXOTH 0 /* execute, others */
+#endif
+#ifndef S_IRWXU
 #define S_IRWXU 0
+#endif
+#ifndef S_IRWXG
 #define S_IRWXG 0
+#endif
+#ifndef S_IRWXO
 #define S_IRWXO 0
+#endif
 
 #if HAVE_SYS_TYPES_H
 // pyconfig.h typedefs this.  We require python headers to be included before


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67910.221298.patch
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190923/48d8e442/attachment-0001.bin>


More information about the lldb-commits mailing list