From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7727 invoked by alias); 7 Mar 2002 02:52:41 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 7630 invoked from network); 7 Mar 2002 02:52:37 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 7 Mar 2002 02:52:37 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id SAA07317; Wed, 6 Mar 2002 18:52:35 -0800 (PST) Received: from free.redhat.lsd.ic.unicamp.br (vpnuser.sfbay.redhat.com [10.255.17.130] (may be forged)) by cse.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id SAA12342; Wed, 6 Mar 2002 18:52:33 -0800 (PST) Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.11.6/8.11.6) id g272qWu19840; Wed, 6 Mar 2002 23:52:32 -0300 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, insight@sources.redhat.com Subject: Re: GDB CVS won't build on OSF4.0's cc References: <3C86C927.4070601@cygnus.com> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Wed, 06 Mar 2002 18:52:00 -0000 In-Reply-To: Andrew Cagney's message of "Wed, 06 Mar 2002 20:57:59 -0500" Message-ID: User-Agent: Gnus/5.0805 (Gnus v5.8.5) Emacs/20.7 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-q1/txt/msg00185.txt.bz2 --=-=-= Content-length: 1144 On Mar 6, 2002, Andrew Cagney wrote: > I don't know that this belongs in defs.h (definitly not without a big > comment explaining the history :-). As you note, gdb doesn't include > tclInt.h, only GDBTK. I suspect gdbtk/generic/gdbtk.h or autoconf is > better? It would be a silly use of autoconf, since gdb just assumes stdarg.h is there. As for its not including tclInt.h, it's true that gdb itself does not, but some of the gdbtk files include tk, itcl and tix headers that end up including tclInt.h. Unfortunately, they include gdbtk.h only after including such headers, so adding a define in gdbtk.h would be too late. I agree we should try to keep gdbtk as separate from gdb as possible, but I thought this define would be ok, since gdb's configure already has code to look for tcl/tk. Anyway, here's an alternate patch that I dislike a bit on the grounds that it doesn't make sure the problem won't show up again in the future, and it won't trigger any warnings should gdb proper ever drop the assumption that stdarg.h is present (unlikely, but... :-) Ok to install? Verified to build with OSF4.0's cc. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gdb-has-stdarg.patch Content-length: 1988 Index: gdb/gdbtk/ChangeLog from Alexandre Oliva * generic/gdbtk.c (HAS_STDARG): Define. * generic/gdbtk-cmds.c (HAS_STDARG): Likewise. * generic/gdbtk-hooks.c (HAS_STDARG): Likewise. Index: gdb/gdbtk/generic/gdbtk-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v retrieving revision 1.52 diff -u -p -r1.52 gdbtk-cmds.c --- gdb/gdbtk/generic/gdbtk-cmds.c 2002/02/11 03:21:55 1.52 +++ gdb/gdbtk/generic/gdbtk-cmds.c 2002/03/07 02:47:19 @@ -35,6 +35,10 @@ #include "top.h" #include "annotate.h" +/* tcl header files includes varargs.h unless HAS_STDARG is defined, + but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */ +#define HAS_STDARG 1 + #include #include Index: gdb/gdbtk/generic/gdbtk-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v retrieving revision 1.21 diff -u -p -r1.21 gdbtk-hooks.c --- gdb/gdbtk/generic/gdbtk-hooks.c 2002/02/14 07:25:22 1.21 +++ gdb/gdbtk/generic/gdbtk-hooks.c 2002/03/07 02:47:20 @@ -37,6 +37,10 @@ #include #endif +/* tcl header files includes varargs.h unless HAS_STDARG is defined, + but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */ +#define HAS_STDARG 1 + #include #include #include "guitcl.h" Index: gdb/gdbtk/generic/gdbtk.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v retrieving revision 1.26 diff -u -p -r1.26 gdbtk.c --- gdb/gdbtk/generic/gdbtk.c 2002/02/07 21:56:07 1.26 +++ gdb/gdbtk/generic/gdbtk.c 2002/03/07 02:47:20 @@ -38,6 +38,10 @@ #include #endif +/* tcl header files includes varargs.h unless HAS_STDARG is defined, + but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */ +#define HAS_STDARG 1 + #include #include #include --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--