1 //===-- lldb-python.h --------------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H 11 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H 12 13 // Python.h needs to be included before any system headers in order to avoid redefinition of macros 14 15 #ifdef LLDB_DISABLE_PYTHON 16 // Python is disabled in this build 17 #else 18 #if defined(__linux__) 19 // features.h will define _POSIX_C_SOURCE if _GNU_SOURCE is defined. This value 20 // may be different from the value that Python defines it to be which results 21 // in a warning. Undefine _POSIX_C_SOURCE before including Python.h The same 22 // holds for _XOPEN_SOURCE. 23 #undef _POSIX_C_SOURCE 24 #undef _XOPEN_SOURCE 25 #endif 26 27 // Include python for non windows machines 28 #include <Python.h> 29 #endif // LLDB_DISABLE_PYTHON 30 31 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H 32