<div dir="ltr">I actually think a better solution is to just stop building PseudoTerminal stuff on Windows. That's a larger change, but I suspect I'll do it at some point in the future.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 2:44 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">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Thu, Jul 31, 2014 at 2:30 PM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><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>
</div><div>Zachary Turner wrote:<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>
</div>Yes, I think that would be a good idea. I was trying to do the inverse condition of the one in win32.h here, to avoid it being defined twice. I think we should unify it in win32.h if possible.<br></blockquote></div>
<div>
I thought that might be what it was, but inverse would be #if !defined(__MINGW32__) || !defined(LLDB_DISABLE_PYTHON). But then after you fix the original case, the inverse will be different. </div><div><br></div><div>I thought about this some and here's what I think: The correct condition in win32.h is #if defined(LLDB_DISABLE_PYTHON) && !defined(<span style="font-size:13px;color:rgb(80,0,80);font-family:arial,sans-serif">__MINGW32__)</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">In PseudoTerminal.cpp I think you can use simply #if </span>!defined(__MINGW32__)</div>
<div><br></div><div>Note that the two aren't strict inverses. If __MINGW32__ is defined, you never want pid_t because mingw headers already provide it. So in neither case should it be defined.</div><div><br></div><div>
Python.h on native Win32 typedefs it separately though. So in the header file, which is supposed to be general purpose and shouldn't conflict with Python.h, we only typedef pid_t if python is disabled since there's no chance of a conflict. If Python is NOT disabled, then don't do anything, since it would make the two headers incompatible.</div>
<div><br></div><div>In PseudoTerminal.cpp, we know we aren't ever going to include Python.h, so we can just always typedef it.</div><div><br></div><div>It's kind of confusing though, so I hope I did that right.</div>
<div> </div></div></div></div>
</blockquote></div><br></div>