This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-8.0-branch] Fix tui compilation with Solaris libcurses: clear define (PR tui/21482)
- From: Rainer Orth <ro at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 19 May 2017 13:05:32 -0000
- Subject: [binutils-gdb/gdb-8.0-branch] Fix tui compilation with Solaris libcurses: clear define (PR tui/21482)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=814385bb257fec68e0e64d43f2ccc40e219342e7
commit 814385bb257fec68e0e64d43f2ccc40e219342e7
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Fri May 19 15:03:52 2017 +0200
Fix tui compilation with Solaris libcurses: clear define (PR tui/21482)
Diff:
---
gdb/ChangeLog | 7 +++++++
gdb/gdb_curses.h | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9754ba0..d5a6c30 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ PR tui/21482
+ * gdb_curses.h (NOMACROS): Define.
+ (NCURSES_NOMACROS): Define.
+
+2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR tui/21482
* tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
arg to char *.
* tui/tui-wingeneral.c (box_win): Likewise.
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
index 16442c7..72fafe3 100644
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -32,6 +32,13 @@
#undef KEY_EVENT
#endif
+/* On Solaris and probably other SysVr4 derived systems, we need to define
+ NOMACROS so the native <curses.h> doesn't define clear which interferes
+ with the clear member of class string_file. ncurses potentially has a
+ similar problem and fix. */
+#define NOMACROS
+#define NCURSES_NOMACROS
+
#if defined (HAVE_NCURSES_NCURSES_H)
#include <ncurses/ncurses.h>
#elif defined (HAVE_NCURSES_H)