This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite] gdb.base/auxv.c: add #include for gcc HEAD
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 04 Aug 2004 20:20:11 -0400
- Subject: [patch/testsuite] gdb.base/auxv.c: add #include for gcc HEAD
This patch adds "#include <stdlib.h>" to gdb.base/auxv.c, so that it
compiles with gcc HEAD 20040804, which gives a warning if "abort" is used
without a prototype.
Tested on native i686-pc-linux-gnu, gcc 2.95.3 3.3.4 3.4.1
HEAD-20040804, dwarf-2 and stabs+.
I am committing this now. Plus a lot more of these little one-liners,
preceded by copyright addition patches for the files that need them.
Michael C
2004-08-04 Michael Chastain <mec.gnu@mindspring.com>
* gdb.base/auxv.c: Include <stdlib.h>.
Index: gdb.base/auxv.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/auxv.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 auxv.c
*** gdb.base/auxv.c 5 Aug 2004 00:04:28 -0000 1.2
--- gdb.base/auxv.c 5 Aug 2004 00:14:41 -0000
***************
*** 1,4 ****
! /* Copyright 1992, 1993, 1994, 1995, 1996, 1999
Free Software Foundation, Inc.
This file is part of GDB.
--- 1,4 ----
! /* Copyright 1992, 1993, 1994, 1995, 1996, 1999, 2004
Free Software Foundation, Inc.
This file is part of GDB.
***************
*** 31,36 ****
--- 31,37 ----
#endif
#if HAVE_ABORT
+ #include <stdlib.h>
#define ABORT abort()
#else
#define ABORT {char *invalid = 0; *invalid = 0xFF;}