Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] Add a prototype for tgetnum
@ 2006-02-23 18:35 Daniel Jacobowitz
  2006-02-23 20:18 ` Mark Kettenis
  2006-02-24  8:38 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-02-23 18:35 UTC (permalink / raw)
  To: gdb-patches

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 */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rfa] Add a prototype for tgetnum
  2006-02-23 18:35 [rfa] Add a prototype for tgetnum Daniel Jacobowitz
@ 2006-02-23 20:18 ` Mark Kettenis
  2006-02-23 21:00   ` Daniel Jacobowitz
  2006-02-24  8:38 ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2006-02-23 20:18 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

> Date: Thu, 23 Feb 2006 13:32:24 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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?

Looks ok to me.

> 2006-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* gdb_curses.h: Provide a fallback prototype for tgetnum.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rfa] Add a prototype for tgetnum
  2006-02-23 20:18 ` Mark Kettenis
@ 2006-02-23 21:00   ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-02-23 21:00 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Thu, Feb 23, 2006 at 09:02:51PM +0100, Mark Kettenis wrote:
> > Date: Thu, 23 Feb 2006 13:32:24 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > 
> > 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?
> 
> Looks ok to me.

Thanks, checked in.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rfa] Add a prototype for tgetnum
  2006-02-23 18:35 [rfa] Add a prototype for tgetnum Daniel Jacobowitz
  2006-02-23 20:18 ` Mark Kettenis
@ 2006-02-24  8:38 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2006-02-24  8:38 UTC (permalink / raw)
  To: gdb-patches

> Date: Thu, 23 Feb 2006 13:32:24 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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?

Not me, this looks fine.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-24  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-23 18:35 [rfa] Add a prototype for tgetnum Daniel Jacobowitz
2006-02-23 20:18 ` Mark Kettenis
2006-02-23 21:00   ` Daniel Jacobowitz
2006-02-24  8:38 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox