[rfa] Add a prototype for tgetnum

Daniel Jacobowitz drow@false.org
Thu Feb 23 18:35:00 GMT 2006


Right now a Win32 GDB fails to build because of the tgetnum ("li") call
in utils.c.  This patch parallels why it works for readline, which doesn't
get a warning.

Does anyone object?

-- 
Daniel Jacobowitz
CodeSourcery

2006-02-23  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb_curses.h: Provide a fallback prototype for tgetnum.

Index: src/gdb/gdb_curses.h
===================================================================
--- src.orig/gdb/gdb_curses.h	2006-02-23 11:40:05.000000000 -0500
+++ src/gdb/gdb_curses.h	2006-02-23 13:29:43.000000000 -0500
@@ -1,6 +1,6 @@
 /* Portable <curses.h>.
 
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,6 +36,12 @@
 #include <ncurses/term.h>
 #elif defined (HAVE_TERM_H)
 #include <term.h>
+#else
+/* On MinGW, a real termcap library is usually not present.  Stub versions
+   of the termcap functions will be built from win32-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.  */
+extern int tgetnum (const char *);
 #endif
 
 #endif /* gdb_curses.h */



More information about the Gdb-patches mailing list