From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11608 invoked by alias); 21 Jun 2003 17:10:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11429 invoked from network); 21 Jun 2003 17:10:51 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 21 Jun 2003 17:10:51 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Tltu-0006AI-00 for ; Sat, 21 Jun 2003 12:11:42 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19Tlt1-0002Eu-00 for ; Sat, 21 Jun 2003 13:10:47 -0400 Date: Sat, 21 Jun 2003 17:10:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [ob?] Fix the FIXME in TUI Message-ID: <20030621171046.GA8571@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00663.txt.bz2 I introduced this wart, so it falls to me to remove it - now that we have TRUE/FALSE in BFD, we don't need to play games with ncurses.h or stdbool.h any more. Unless someone objects, I'll commit this patch tomorrow. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-06-21 Daniel Jacobowitz * tui-hooks.c: Update include order. * tui.c: Likewise. * tuiCommand.c: Likewise. * tuiData.c: Likewise. * tuiDataWin.c: Likewise. * tuiDisassem.c: Likewise. * tuiGeneralWin.c: Likewise. * tuiIO.c: Likewise. * tuiLayout.c: Likewise. * tuiRegs.c: Likewise. * tuiSource.c: Likewise. * tuiSourceWin.c: Likewise. * tuiStack.c: Likewise. * tuiWin.c: Likewise. Index: tui-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v retrieving revision 1.13 diff -u -p -r1.13 tui-hooks.c --- tui-hooks.c 12 Jun 2003 15:44:24 -0000 1.13 +++ tui-hooks.c 21 Jun 2003 17:04:36 -0000 @@ -1,6 +1,6 @@ /* GDB hooks for TUI. - Copyright 2001, 2002 Free Software Foundation, Inc. + Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -19,23 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include "symtab.h" #include "inferior.h" @@ -65,6 +48,14 @@ #include "tuiStack.h" #include "tuiDataWin.h" #include "tuiSourceWin.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif int tui_target_has_run = 0; Index: tui.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui.c,v retrieving revision 1.30 diff -u -p -r1.30 tui.c --- tui.c 14 Feb 2003 13:58:06 -0000 1.30 +++ tui.c 21 Jun 2003 17:04:36 -0000 @@ -1,6 +1,6 @@ /* General functions for the WDB TUI. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include #include #include @@ -69,6 +52,14 @@ #include "inferior.h" #include "symtab.h" #include "source.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /* Tells whether the TUI is active or not. */ int tui_active = 0; Index: tuiCommand.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiCommand.c,v retrieving revision 1.6 diff -u -p -r1.6 tuiCommand.c --- tuiCommand.c 1 Mar 2002 06:19:28 -0000 1.6 +++ tuiCommand.c 21 Jun 2003 17:04:36 -0000 @@ -1,6 +1,6 @@ /* Specific command window processing. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,15 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ +#include "defs.h" +#include +#include "tui.h" +#include "tuiData.h" +#include "tuiWin.h" +#include "tuiIO.h" -#include "config.h" #ifdef HAVE_NCURSES_H #include #else @@ -38,13 +36,6 @@ #include #endif #endif - -#include "defs.h" -#include -#include "tui.h" -#include "tuiData.h" -#include "tuiWin.h" -#include "tuiIO.h" /***************************************** Index: tuiData.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiData.c,v retrieving revision 1.11 diff -u -p -r1.11 tuiData.c --- tuiData.c 1 Sep 2002 10:49:00 -0000 1.11 +++ tuiData.c 21 Jun 2003 17:04:36 -0000 @@ -1,6 +1,6 @@ /* TUI data manipulation routines. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,15 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ +#include "defs.h" +#include "symtab.h" +#include "tui.h" +#include "tuiData.h" +#include "tuiGeneralWin.h" -#include "config.h" #ifdef HAVE_NCURSES_H #include #else @@ -38,12 +35,6 @@ #include #endif #endif - -#include "defs.h" -#include "symtab.h" -#include "tui.h" -#include "tuiData.h" -#include "tuiGeneralWin.h" /**************************** ** GLOBAL DECLARATIONS Index: tuiDataWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiDataWin.c,v retrieving revision 1.6 diff -u -p -r1.6 tuiDataWin.c --- tuiDataWin.c 1 Mar 2002 06:19:28 -0000 1.6 +++ tuiDataWin.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* Data/register window display. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,15 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ +#include "defs.h" +#include "tui.h" +#include "tuiData.h" +#include "tuiGeneralWin.h" +#include "tuiRegs.h" -#include "config.h" #ifdef HAVE_NCURSES_H #include #else @@ -38,12 +35,6 @@ #include #endif #endif - -#include "defs.h" -#include "tui.h" -#include "tuiData.h" -#include "tuiGeneralWin.h" -#include "tuiRegs.h" /***************************************** Index: tuiDisassem.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiDisassem.c,v retrieving revision 1.21 diff -u -p -r1.21 tuiDisassem.c --- tuiDisassem.c 12 Jun 2003 15:44:24 -0000 1.21 +++ tuiDisassem.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* Disassembly display. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include "symtab.h" #include "breakpoint.h" @@ -54,6 +37,14 @@ #include "tuiSourceWin.h" #include "tuiStack.h" #include "tui-file.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif struct tui_asm_line { Index: tuiGeneralWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiGeneralWin.c,v retrieving revision 1.12 diff -u -p -r1.12 tuiGeneralWin.c --- tuiGeneralWin.c 25 Aug 2002 11:00:46 -0000 1.12 +++ tuiGeneralWin.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* General window behavior. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,15 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ +#include "defs.h" +#include "tui.h" +#include "tuiData.h" +#include "tuiGeneralWin.h" +#include "tuiWin.h" -#include "config.h" #ifdef HAVE_NCURSES_H #include #else @@ -38,12 +35,6 @@ #include #endif #endif - -#include "defs.h" -#include "tui.h" -#include "tuiData.h" -#include "tuiGeneralWin.h" -#include "tuiWin.h" /*********************** ** PUBLIC FUNCTIONS Index: tuiIO.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiIO.c,v retrieving revision 1.21 diff -u -p -r1.21 tuiIO.c --- tuiIO.c 12 Feb 2003 15:14:36 -0000 1.21 +++ tuiIO.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI support I/O functions. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,24 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - -#include #include "defs.h" #include "terminal.h" #include "target.h" @@ -59,6 +41,15 @@ #include "cli-out.h" #include #include +#include + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /* Use definition from readline 4.3. */ #undef CTRL_CHAR Index: tuiLayout.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiLayout.c,v retrieving revision 1.18 diff -u -p -r1.18 tuiLayout.c --- tuiLayout.c 30 Sep 2002 00:52:27 -0000 1.18 +++ tuiLayout.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI layout window management. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include "command.h" #include "symtab.h" @@ -55,6 +38,14 @@ #include "tuiWin.h" #include "tuiSourceWin.h" #include "tuiDisassem.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /******************************* ** Static Local Decls Index: tuiRegs.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiRegs.c,v retrieving revision 1.17 diff -u -p -r1.17 tuiRegs.c --- tuiRegs.c 8 May 2003 20:52:49 -0000 1.17 +++ tuiRegs.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI display registers in window. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include "tui.h" #include "tuiData.h" @@ -54,6 +37,14 @@ #include "tuiDataWin.h" #include "tuiGeneralWin.h" #include "tui-file.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /***************************************** ** LOCAL DEFINITIONS ** Index: tuiSource.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiSource.c,v retrieving revision 1.15 diff -u -p -r1.15 tuiSource.c --- tuiSource.c 12 Jun 2003 15:44:24 -0000 1.15 +++ tuiSource.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI display source window. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include #include "symtab.h" @@ -53,6 +36,13 @@ #include "tuiSourceWin.h" #include "tuiSource.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /* Function to display source in the source window. */ TuiStatus Index: tuiSourceWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiSourceWin.c,v retrieving revision 1.24 diff -u -p -r1.24 tuiSourceWin.c --- tuiSourceWin.c 12 Jun 2003 15:44:24 -0000 1.24 +++ tuiSourceWin.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI display source/assembly window. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include #include "symtab.h" @@ -56,6 +39,13 @@ #include "tuiSource.h" #include "tuiDisassem.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /* Function to display the "main" routine. */ void Index: tuiStack.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiStack.c,v retrieving revision 1.27 diff -u -p -r1.27 tuiStack.c --- tuiStack.c 12 Jun 2003 15:44:24 -0000 1.27 +++ tuiStack.c 21 Jun 2003 17:04:37 -0000 @@ -1,6 +1,6 @@ /* TUI display locator. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -22,23 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - #include "defs.h" #include "symtab.h" #include "breakpoint.h" @@ -56,6 +39,13 @@ #include "tuiSourceWin.h" #include "tui-file.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif /* Get a printable name for the function at the address. The symbol name is demangled if demangling is turned on. Index: tuiWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v retrieving revision 1.28 diff -u -p -r1.28 tuiWin.c --- tuiWin.c 12 Jun 2003 15:44:24 -0000 1.28 +++ tuiWin.c 21 Jun 2003 17:04:38 -0000 @@ -1,6 +1,6 @@ /* TUI window generic functions. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, + Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -27,26 +27,6 @@ Author: Susan B. Macchia */ -/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that - "defs.h" should be included first. Unfortunatly some systems - (currently Debian GNU/Linux) include the via - and they clash with "bfd.h"'s definiton of true/false. The correct - fix is to remove true/false from "bfd.h", however, until that - happens, hack around it by including "config.h" and - first. */ - -#include "config.h" -#ifdef HAVE_NCURSES_H -#include -#else -#ifdef HAVE_CURSES_H -#include -#endif -#endif - -#include -#include -#include #include "defs.h" #include "command.h" #include "symtab.h" @@ -65,6 +45,18 @@ #include "tuiSource.h" #include "tuiSourceWin.h" #include "tuiDataWin.h" + +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + +#include +#include +#include /******************************* ** Static Local Decls