view src/gdb-1-fix-termcap.patch @ 4066:0962acdde3be

builld: allow out of source build * Makefile.in: add TOP_BUILD_DIR var and use TOP_DIR=srcdir, TOP_BUILD_DIR=builddir, modify paths to use TOP_DIR where needed * binary-dist-rules.mk: use TOP_DIR and TOP_BUILD_DIR where needed * makeinst-script.sh: use script path to determine TOPDIR, use TOPDIR where needed * src/default-octave.mk: install octave-version to builddir * src/stable-octave.mk: install octave-version to builddir * src/octave.mk: install octave-version to builddir * tools/set-mxe-env.sh.in: update fir builddir and srcdir use
author John Donoghue
date Wed, 23 Dec 2015 08:11:04 -0500
parents 5a00da34fd24
children
line wrap: on
line source

This file is part of MXE.
See index.html for further information.

diff --git a/gdb/windows-termcap.c b/gdb/windows-termcap.c
index caafc47..809ae6d 100644
--- a/gdb/windows-termcap.c
+++ b/gdb/windows-termcap.c
@@ -19,9 +19,16 @@
    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"
-
+#include "config.h"
+
+#if defined (HAVE_NCURSES_TERM_H)
+#elif defined (HAVE_TERM_H)
+#else
+/* On MinGW, a real termcap library is usually not present.  Stub versions
+   of the termcap functions will be built from windows-termcap.c.  Readline
+   provides its own extern declarations when there's no termcap.h; do the
+   same here for the termcap functions used in GDB.  */
 #include <stdlib.h>
 
 /* -Wmissing-prototypes */
@@ -74,3 +81,4 @@ tgoto (const char *cap, int col, int row)
 {
   return NULL;
 }
+#endif