Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: [PATCHSET] [4/4] Fix various issue in TUI
Date: Wed, 31 Dec 2014 17:56:00 -0000	[thread overview]
Message-ID: <83vbkrbt4d.fsf@gnu.org> (raw)

Well, one patch is Windows-specific after all.  This patch makes sure
windows-termcap is not compiled when GDB is linked against ncurses,
and also makes the file a no-op should it compile in that
configuration.  This is to avoid shadowing of ncurses functions by the
stubs in windows-termcap.c.

OK to commit?

2014-12-31  Eli Zaretskii  <eliz@gnu.org>

	* gdb/configure.ac [mingw32]: Don't add windows-termcap.o to
	CONFIG_OBJS if a curses library is going to be used.

	* gdb/windows-termcap.c: Make the entire file a no-op if any
	kind of curses library i being used.


--- gdb/configure.ac~0	2014-10-29 21:45:50 +0200
+++ gdb/configure.ac	2014-12-30 07:42:27 +0200
@@ -627,9 +627,10 @@
     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.


--- gdb/windows-termcap.c~0	2014-06-11 18:34:41 +0300
+++ gdb/windows-termcap.c	2014-12-29 15:42:44 +0200
@@ -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 "config.h"
+
+#if !defined HAVE_CURSES_H && !defined HAVE_NCURSES_H && !defined HAVE_NCURSES_NCURSES_H
+
 #include <stdlib.h>
 
 /* -Wmissing-prototypes */
@@ -71,3 +76,5 @@
 {
   return NULL;
 }
+
+#endif	/* !HAVE_CURSES_H && !HAVE_NCURSES_H && !HAVE_NCURSES_NCURSES_H */


             reply	other threads:[~2014-12-31 17:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 17:56 Eli Zaretskii [this message]
2015-01-05 19:55 ` Pedro Alves
2015-01-05 20:06   ` Eli Zaretskii
2015-01-17  9:55     ` Eli Zaretskii
2015-01-19 14:50       ` Joel Brobecker
2015-01-19 16:26         ` Eli Zaretskii
2015-01-19 16:54           ` Joel Brobecker
2015-01-19 15:43       ` Joel Brobecker
2015-01-19 17:31         ` Eli Zaretskii
2015-01-19 17:54           ` Joel Brobecker
2015-01-22 12:07       ` Pedro Alves
2015-01-22 16:26         ` Eli Zaretskii
2015-01-22 17:15           ` Pedro Alves
2015-01-22 17:30             ` Eli Zaretskii
2015-01-22 18:36               ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83vbkrbt4d.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox