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]

[ob/testsuite/mi] add #include lines for gcc HEAD


Here is the money patch.  This patch fixes most of gdb.mi/*.c to compile
with gcc HEAD.

I tested this on:

  native i686-pc-linux-gnu
  gcc 2.95.3 3.3.4 3.4.1 HEAD-20040824
  dwarf-2, stabs+.

With the released gcc's, the test results are unchanged.
With gcc HEAD, this fixes about one thousand ERROR, WARNING,
FAIL, and UNRESOLVED results.

I claim this is obvious.  I'll leave it up for 24 hours for any
comments or objections.

2004-08-25  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.mi/basics.c: Include <stdio.h>.
	* gdb.mi/pthreads.c: Include <stdlib.h>.
	* gdb.mi/var-cmd.c: Include <stdlib.h>.

Index: gdb.mi/basics.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/basics.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 basics.c
*** gdb.mi/basics.c	25 Aug 2004 00:54:53 -0000	1.4
--- gdb.mi/basics.c	25 Aug 2004 12:45:02 -0000
***************
*** 1,4 ****
! /* Copyright 1999, 2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,4 ----
! /* Copyright 1999, 2000, 2004
     Free Software Foundation, Inc.
  
     This file is part of GDB.
***************
*** 23,28 ****
--- 23,30 ----
   *      on function calls.  Useful to test printing frames, stepping, etc.
   */
  
+ #include <stdio.h>
+ 
  int callee4 (void)
  {
    int A=1;
Index: gdb.mi/pthreads.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/pthreads.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 pthreads.c
*** gdb.mi/pthreads.c	8 Jan 2004 21:43:39 -0000	1.6
--- gdb.mi/pthreads.c	25 Aug 2004 12:45:02 -0000
***************
*** 24,29 ****
--- 24,30 ----
     Boston, MA 02111-1307, USA.  */
  
  #include <stdio.h>
+ #include <stdlib.h>
  #include <pthread.h>
  
  /* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create
Index: gdb.mi/var-cmd.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/var-cmd.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 var-cmd.c
*** gdb.mi/var-cmd.c	25 Aug 2004 00:54:53 -0000	1.2
--- gdb.mi/var-cmd.c	25 Aug 2004 12:45:02 -0000
***************
*** 1,4 ****
! /* Copyright 1999 Free Software Foundation, Inc.
  
     This file is part of GDB.
  
--- 1,4 ----
! /* Copyright 1999, 2004 Free Software Foundation, Inc.
  
     This file is part of GDB.
  
***************
*** 17,22 ****
--- 17,24 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include <stdlib.h>
+ 
  struct _simple_struct {
    int integer;
    unsigned int unsigned_integer;


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