[Lldb-commits] [PATCH] D85219: [lldb] fix building with panel.h being in /usr/include/ncurses/

Luboš Luňák via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 4 09:42:04 PDT 2020


llunak created this revision.
llunak added a reviewer: clayborg.
Herald added a subscriber: mgorny.
llunak requested review of this revision.

My openSUSE 15.2 has /usr/include/curses.h as a symlink to /usr/include/ncurses/curses.h , but there's no such symlink for panel.h . Prefer using /usr/include/ncurses for the includes if they are found there by the CMake check.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D85219

Files:
  lldb/include/lldb/Host/Config.h.cmake
  lldb/source/Core/IOHandlerCursesGUI.cpp


Index: lldb/source/Core/IOHandlerCursesGUI.cpp
===================================================================
--- lldb/source/Core/IOHandlerCursesGUI.cpp
+++ lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -10,9 +10,14 @@
 #include "lldb/Host/Config.h"
 
 #if LLDB_ENABLE_CURSES
+#if CURSES_HAVE_NCURSES_CURSES_H
+#include <ncurses/curses.h>
+#include <ncurses/panel.h>
+#else
 #include <curses.h>
 #include <panel.h>
 #endif
+#endif
 
 #if defined(__APPLE__)
 #include <deque>
Index: lldb/include/lldb/Host/Config.h.cmake
===================================================================
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -38,6 +38,8 @@
 
 #cmakedefine01 LLDB_ENABLE_CURSES
 
+#cmakedefine01 CURSES_HAVE_NCURSES_CURSES_H
+
 #cmakedefine01 LLDB_ENABLE_LIBEDIT
 
 #cmakedefine01 LLDB_ENABLE_LIBXML2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85219.282949.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200804/8352a86c/attachment-0001.bin>


More information about the lldb-commits mailing list