diff options
Diffstat (limited to 'source/Plugins/ScriptInterpreter/Python/lldb-python.h')
-rw-r--r-- | source/Plugins/ScriptInterpreter/Python/lldb-python.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/Plugins/ScriptInterpreter/Python/lldb-python.h b/source/Plugins/ScriptInterpreter/Python/lldb-python.h index 013492c39bf8..ee13b7a5cd1f 100644 --- a/source/Plugins/ScriptInterpreter/Python/lldb-python.h +++ b/source/Plugins/ScriptInterpreter/Python/lldb-python.h @@ -1,4 +1,5 @@ -//===-- lldb-python.h --------------------------------------------*- C++ -*-===// +//===-- lldb-python.h --------------------------------------------*- C++ +//-*-===// // // The LLVM Compiler Infrastructure // @@ -10,11 +11,20 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H -// Python.h needs to be included before any system headers in order to avoid redefinition of macros +// Python.h needs to be included before any system headers in order to avoid +// redefinition of macros #ifdef LLDB_DISABLE_PYTHON // Python is disabled in this build #else +#include "llvm/Support/Compiler.h" +#if defined(LLVM_ON_WIN32) +// If anyone #includes Host/PosixApi.h later, it will try to typedef pid_t. We +// need to ensure this doesn't happen. At the same time, Python.h will also try +// to redefine a bunch of stuff that PosixApi.h defines. So define it all now +// so that PosixApi.h doesn't redefine it. +#define NO_PID_T +#endif #if defined(__linux__) // features.h will define _POSIX_C_SOURCE if _GNU_SOURCE is defined. This value // may be different from the value that Python defines it to be which results |