This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-7.9-branch] Don't use windows-termcap.c when linking against a curses library
- From: Eli Zaretskii <eliz at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 19 Jan 2015 17:29:02 -0000
- Subject: [binutils-gdb/gdb-7.9-branch] Don't use windows-termcap.c when linking against a curses library
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=564d5724ed741a6e74414ccfc4d188b7699d5ac2
commit 564d5724ed741a6e74414ccfc4d188b7699d5ac2
Author: Eli Zaretskii <eliz@gnu.org>
Date: Mon Jan 19 16:34:29 2015 +0100
Don't use windows-termcap.c when linking against a curses library
gdb/
2015-01-17 Eli Zaretskii <eliz@gnu.org>
* configure.ac [*mingw32*]: Only add windows-termcap.o to
CONFIG_OBS if not building with a curses library.
* configure: Regenerate.
* windows-termcap.c: Include defs.h. Make the whole body empty if
either one of HAVE_CURSES_H or HAVE_NCURSES_H or
HAVE_NCURSES_NCURSES_H is defined.
(cherry picked from commit 63413d85873c450fa4ed2494f21fb1a65bdaf554)
Diff:
---
gdb/ChangeLog | 10 ++++++++++
gdb/configure | 7 ++++---
gdb/configure.ac | 7 ++++---
gdb/windows-termcap.c | 7 +++++++
4 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 721076c..6eb4e7a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2015-01-19 Eli Zaretskii <eliz@gnu.org>
+
+ * configure.ac [*mingw32*]: Only add windows-termcap.o to
+ CONFIG_OBS if not building with a curses library.
+ * configure: Regenerate.
+
+ * windows-termcap.c: Include defs.h. Make the whole body empty if
+ either one of HAVE_CURSES_H or HAVE_NCURSES_H or
+ HAVE_NCURSES_NCURSES_H is defined.
+
2015-01-16 Eli Zaretskii <eliz@gnu.org>
* tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
diff --git a/gdb/configure b/gdb/configure
index 7ff74ba..0c3a19a 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -7184,9 +7184,10 @@ case $host_os in
ac_cv_search_tgetent="none required"
;;
*mingw32*)
- ac_cv_search_tgetent="none required"
- CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
- ;;
+ if test x"$prefer_curses" != xyes; then
+ ac_cv_search_tgetent="none required"
+ CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
+ fi ;;
esac
# These are the libraries checked by Readline.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index ec776d7..6a276f0 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -607,9 +607,10 @@ case $host_os in
ac_cv_search_tgetent="none required"
;;
*mingw32*)
- ac_cv_search_tgetent="none required"
- CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
- ;;
+ if test x"$prefer_curses" != xyes; then
+ ac_cv_search_tgetent="none required"
+ CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
+ fi ;;
esac
# These are the libraries checked by Readline.
diff --git a/gdb/windows-termcap.c b/gdb/windows-termcap.c
index 026c3d2..0154083 100644
--- a/gdb/windows-termcap.c
+++ b/gdb/windows-termcap.c
@@ -19,6 +19,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "defs.h"
+
+#if !defined HAVE_CURSES_H && !defined HAVE_NCURSES_H && !defined HAVE_NCURSES_NCURSES_H
+
#include <stdlib.h>
/* -Wmissing-prototypes */
@@ -71,3 +76,5 @@ tgoto (const char *cap, int col, int row)
{
return NULL;
}
+
+#endif /* !HAVE_CURSES_H && !HAVE_NCURSES_H && !HAVE_NCURSES_NCURSES_H */