1 //===-- lldb-python.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_lldb_python_h_
11 #define LLDB_lldb_python_h_
13 // Python.h needs to be included before any system headers in order to avoid redefinition of macros
15 #ifdef LLDB_DISABLE_PYTHON
16 // Python is disabled in this build
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
27 // Include python for non windows machines
29 #endif // LLDB_DISABLE_PYTHON
31 #endif // LLDB_lldb_python_h_