diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
commit | 14f1b3e8826ce43b978db93a62d1166055db5394 (patch) | |
tree | 0a00ad8d3498783fe0193f3b656bca17c4c8697d /source/Plugins/ScriptInterpreter/Python/lldb-python.h | |
parent | 4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff) |
Notes
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 013492c39bf80..ee13b7a5cd1f7 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 |