This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/testsuite] callfuncs.c: compile on hp-ux


This patch fixes gdb.base/callfuncs.c so that it compiles on hp-ux.
The problem was a bogus malloc declaration.  Just use stdlib.h
like 20 other files -- in fact, callfuncs.c already includes stdlib.h!

Tested on:

  native i686-pc-linux-gnu, gcc 2.95.3 3.3.2 HEAD, dwarf-2 and stabs+
  native hppa2.0w-hp-hpux11.11 with HP C B.11.11.28706.GP

IACTN.

2004-01-14  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.base/callfuncs.c: Remove explicit declaration of malloc.

Index: gdb.base/callfuncs.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 callfuncs.c
*** gdb.base/callfuncs.c	14 Jan 2004 14:11:40 -0000	1.5
--- gdb.base/callfuncs.c	14 Jan 2004 14:21:01 -0000
***************
*** 1,6 ****
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
--- 1,6 ----
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2004
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
*************** int a, b;
*** 379,385 ****
  
  /* Gotta have a main to be able to generate a linked, runnable
     executable, and also provide a useful place to set a breakpoint. */
! extern void * malloc() ;
  int main ()
  {
  #ifdef usestubs
--- 379,385 ----
  
  /* Gotta have a main to be able to generate a linked, runnable
     executable, and also provide a useful place to set a breakpoint. */
! 
  int main ()
  {
  #ifdef usestubs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]