<div dir="ltr">I put up a separate patch for the mkstemp thing.  If Greg doesn't like it we can go with this instead.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 11:38 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>

<br>
================<br>
Comment at: include/lldb/Host/windows/win32.h:57<br>
@@ -53,2 +56,3 @@<br>
 #ifdef LLDB_DISABLE_PYTHON<br>
+#ifdef __MINGW32__<br>
 typedef uint32_t pid_t;<br>
----------------<br>
Is this supposed to be #ifndef instead of #ifdef?  As it stands, this changes the behavior on native Win32.<br>
<br>
================<br>
Comment at: source/Utility/PseudoTerminal.cpp:23-27<br>
@@ -22,2 +22,7 @@<br>
+<br>
+#ifndef __MINGW32__<br>
+#ifndef LLDB_DISABLE_PYTHON<br>
 typedef uint32_t pid_t;<br>
+#endif<br>
+#endif<br>
 // empty functions<br>
----------------<br>
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?<br>

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