
Restrict building the readline override to Linux only. It both does not build on *BSD systems, and is largely irrelevant since they default to using libedit over readline anyway. This restores the behavior of the old readline override that also was built only on Linux. Differential Revision: https://reviews.llvm.org/D69846
27 lines
1015 B
C++
27 lines
1015 B
C++
//===-- PythonReadline.h ----------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
|
|
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
|
|
|
|
#if !defined(LLDB_DISABLE_LIBEDIT) && defined(__linux__)
|
|
// NOTE: Since Python may define some pre-processor definitions which affect the
|
|
// standard headers on some systems, you must include Python.h before any
|
|
// standard headers are included.
|
|
#include "Python.h"
|
|
|
|
// no need to hack into Python's readline module if libedit isn't used.
|
|
//
|
|
#define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
|
|
|
|
extern "C" PyMODINIT_FUNC initlldb_readline(void);
|
|
|
|
#endif
|
|
|
|
#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
|