[Lldb-commits] [lldb] r252250 - Reuse native curses(8) library on NetBSD

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 5 16:21:18 PST 2015


Author: brucem
Date: Thu Nov  5 18:21:18 2015
New Revision: 252250

URL: http://llvm.org/viewvc/llvm-project?rev=252250&view=rev
Log:
Reuse native curses(8) library on NetBSD

Summary:
The reason for it is limit of detecting ncurses on various systems. For
example, Ubuntu ships with <curses.h> and linkage from <ncurses.h>, <ncurses.h>
isn't detected by CMake. Detecting `<curses.h>` on NetBSD is reusing
conflicting header from the host curses(8) and pkgsrc's ncurses library.

ncurses ships on most (till conflicting) systems with curses.h. On NetBSD it
might be conflicting, so the ncurses headers are installed with pkgsrc to a
subdirectory "ncurses/".

Patch by Kamil Rytarowski. Thanks!

Reviewers: clayborg

Subscribers: youri, akat1, brucem, joerg, lldb-commits

Differential Revision: http://reviews.llvm.org/D14037

Modified:
    lldb/trunk/source/Core/IOHandler.cpp

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=252250&r1=252249&r2=252250&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Thu Nov  5 18:21:18 2015
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include <ncurses.h>
+#include <curses.h>
 #include <panel.h>
 #endif
 
@@ -4107,7 +4107,9 @@ CursesKeyToCString (int ch)
         case KEY_UNDO:      return "undo key";
         case KEY_MOUSE:     return "Mouse event has occurred";
         case KEY_RESIZE:    return "Terminal resize event";
+#ifdef KEY_EVENT
         case KEY_EVENT:     return "We were interrupted by an event";
+#endif
         case KEY_RETURN:    return "return";
         case ' ':           return "space";
         case '\t':          return "tab";




More information about the lldb-commits mailing list