]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-python.h
MFV r276568:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / lldb-python.h
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_lldb_python_h_
11 #define LLDB_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_lldb_python_h_