public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: GDB CVS won't build on OSF4.0's cc
       [not found]     ` <orpu2hqlq8.fsf@free.redhat.lsd.ic.unicamp.br>
@ 2002-03-06 17:58       ` Andrew Cagney
  2002-03-06 18:52         ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-03-06 17:58 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gdb-patches, insight

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

[added insight]

> On May 29, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:
> 
> 
>> Another problem showed up while building gdbtk.  gdb/defs.h #includes
>> <stdarg.h>, but tcl/generic/tclInt.h #includes <varargs.h>, because
>> HAS_STDARG is not defined.
> 
> 
>> It turns out that the va_start macro defined in varargs.h ends up
>> overriding that of stdarg.h, so we call va_start with the wrong number
>> of arguments.
> 
> 
>> Since GDB assumes the existence of stdarg.h, I suppose this patch
>> would be acceptable.  Ok to install?
> 
> 
> This one seems to have never been acknowledged.  Ok for 5.2 and
> mainline?

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?

Andrew


[-- Attachment #2: mailbox-message://ac131313@movemail/fsf/gdb/patches#899876 --]
[-- Type: message/rfc822, Size: 4176 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 574 bytes --]

On May 29, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:

> Another problem showed up while building gdbtk.  gdb/defs.h #includes
> <stdarg.h>, but tcl/generic/tclInt.h #includes <varargs.h>, because
> HAS_STDARG is not defined.

> It turns out that the va_start macro defined in varargs.h ends up
> overriding that of stdarg.h, so we call va_start with the wrong number
> of arguments.

> Since GDB assumes the existence of stdarg.h, I suppose this patch
> would be acceptable.  Ok to install?

This one seems to have never been acknowledged.  Ok for 5.2 and
mainline?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: gdb-has-stdarg.patch --]
[-- Type: text/x-patch, Size: 513 bytes --]

Index: gdb/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* defs.h (HAS_STDARG): Define it.

Index: gdb/defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.50
diff -u -p -r1.50 defs.h
--- gdb/defs.h 2001/05/15 00:03:36 1.50
+++ gdb/defs.h 2001/05/29 11:10:38
@@ -54,6 +54,7 @@
 #include "ansidecl.h"
 
 #include <stdarg.h>		/* for va_list */
+#define HAS_STDARG 1		/* Avoid varargs.h in tcl.  */
 
 #include "libiberty.h"
 

[-- Attachment #2.1.3: Type: text/plain, Size: 289 bytes --]


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

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

* Re: GDB CVS won't build on OSF4.0's cc
  2002-03-06 17:58       ` GDB CVS won't build on OSF4.0's cc Andrew Cagney
@ 2002-03-06 18:52         ` Alexandre Oliva
  2002-03-13 11:19           ` Alexandre Oliva
  2002-03-25  8:43           ` Alexandre Oliva
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Oliva @ 2002-03-06 18:52 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, insight

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

On Mar  6, 2002, Andrew Cagney <ac131313@cygnus.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb-has-stdarg.patch --]
[-- Type: text/x-patch, Size: 1988 bytes --]

Index: gdb/gdbtk/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* 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 <tix.h>
 #include <itcl.h>
 
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 <windows.h>
 #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 <itcl.h>
 #include <tix.h>
 #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 <windows.h>
 #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 <tix.h>
 #include <itcl.h>
 #include <itk.h>

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


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

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

* Re: GDB CVS won't build on OSF4.0's cc
  2002-03-06 18:52         ` Alexandre Oliva
@ 2002-03-13 11:19           ` Alexandre Oliva
  2002-03-25  8:43           ` Alexandre Oliva
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2002-03-13 11:19 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, insight

On Mar  6, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:

> Index: gdb/gdbtk/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>

> 	* generic/gdbtk.c (HAS_STDARG): Define.
> 	* generic/gdbtk-cmds.c (HAS_STDARG): Likewise.
> 	* generic/gdbtk-hooks.c (HAS_STDARG): Likewise.

Ping?

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

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

* Re: GDB CVS won't build on OSF4.0's cc
  2002-03-06 18:52         ` Alexandre Oliva
  2002-03-13 11:19           ` Alexandre Oliva
@ 2002-03-25  8:43           ` Alexandre Oliva
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2002-03-25  8:43 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, insight

On Mar  6, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:

> Ok to install?  Verified to build with OSF4.0's cc.


> Index: gdb/gdbtk/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>

> 	* generic/gdbtk.c (HAS_STDARG): Define.
> 	* generic/gdbtk-cmds.c (HAS_STDARG): Likewise.
> 	* generic/gdbtk-hooks.c (HAS_STDARG): Likewise.

Keith approved this patch in private, so I'm checking it in, mainline
and 5.2 branch.

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

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

end of thread, other threads:[~2002-03-25 16:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <org0dofodw.fsf@guarana.lsd.ic.unicamp.br>
     [not found] ` <or3d9ofncw.fsf@guarana.lsd.ic.unicamp.br>
     [not found]   ` <ory9rge7dc.fsf@guarana.lsd.ic.unicamp.br>
     [not found]     ` <orpu2hqlq8.fsf@free.redhat.lsd.ic.unicamp.br>
2002-03-06 17:58       ` GDB CVS won't build on OSF4.0's cc Andrew Cagney
2002-03-06 18:52         ` Alexandre Oliva
2002-03-13 11:19           ` Alexandre Oliva
2002-03-25  8:43           ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).