[Lldb-commits] [PATCH] Make build work on MinGW

Zachary Turner zturner at google.com
Wed Jul 30 23:38:31 PDT 2014


Assuming you created this diff with git, would it be possible to use -U999999 in the future?  It helps to be able to browse the rest of the file to get more context.

================
Comment at: include/lldb/Host/windows/win32.h:57
@@ -53,2 +56,3 @@
 #ifdef LLDB_DISABLE_PYTHON
+#ifdef __MINGW32__
 typedef uint32_t pid_t;
----------------
Is this supposed to be #ifndef instead of #ifdef?  As it stands, this changes the behavior on native Win32.

================
Comment at: source/Utility/PseudoTerminal.cpp:23-27
@@ -22,2 +22,7 @@
+
+#ifndef __MINGW32__
+#ifndef LLDB_DISABLE_PYTHON
 typedef uint32_t pid_t;
+#endif
+#endif
 // empty functions
----------------
Little confused about what's going on here and why we're messing with pid_t in two different places (this file and win32.h) with different conditions.  Is it possible to centralize all the logic about what's going on with pid_t into win32.h?

================
Comment at: tools/driver/Driver.cpp:919-924
@@ -912,3 +918,8 @@
         {
+#ifndef __MINGW32__
             int fd = mkstemp(lldb_cmds_file);
+#else
+            mktemp(lldb_cmds_file);
+            int fd = open(lldb_cmds_file,S_IRUSR|S_IWUSR|O_RDWR);
+#endif
             if (fd == -1)
----------------
Can win32.h contain a definition of mkstemp?  Not a fan of pre-processor directives in source files, where avoidable.

http://reviews.llvm.org/D4737






More information about the lldb-commits mailing list