This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Add missing includes to testsuite code
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 24 Jan 2004 19:45:11 +0100 (CET)
- Subject: [PATCH] Add missing includes to testsuite code
The version of GCC that comes with OpenBSD has some local
modifications which do somewhat more stringent checking than the
standard version. In particular it complains about missing
declarations for the built-in functions memset() and memcpy(), and
refuses to compile, making the tests fail. This adds an #include
<string.h> to the relevant files such that I can run these tests on
OpenBSD.
Committed as obvious,
Mark
Index: testsuite/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.base/charset.c, gdb.base/dump.c, gdb.base/huge.c: Include
<string.h>.
Index: testsuite/gdb.base/charset.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/charset.c,v
retrieving revision 1.1
diff -u -p -r1.1 charset.c
--- testsuite/gdb.base/charset.c 20 Sep 2002 00:26:06 -0000 1.1
+++ testsuite/gdb.base/charset.c 24 Jan 2004 18:20:53 -0000
@@ -2,6 +2,7 @@
Jim Blandy <jimb@cygnus.com> --- December 2001 */
#include <stdio.h>
+#include <string.h>
/* X_string is a null-terminated string in the X charset whose
Index: testsuite/gdb.base/dump.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/dump.c,v
retrieving revision 1.1
diff -u -p -r1.1 dump.c
--- testsuite/gdb.base/dump.c 29 Mar 2002 01:19:11 -0000 1.1
+++ testsuite/gdb.base/dump.c 24 Jan 2004 18:20:53 -0000
@@ -1,3 +1,5 @@
+#include <string.h>
+
#define ARRSIZE 32
int intarray[ARRSIZE], intarray2[ARRSIZE];
Index: testsuite/gdb.base/huge.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/huge.c,v
retrieving revision 1.2
diff -u -p -r1.2 huge.c
--- testsuite/gdb.base/huge.c 24 Feb 2002 22:56:08 -0000 1.2
+++ testsuite/gdb.base/huge.c 24 Jan 2004 18:20:53 -0000
@@ -2,6 +2,8 @@
* Test GDB's ability to read a very large data object from target memory.
*/
+#include <string.h>
+
/* A value that will produce a target data object large enough to
crash GDB. 0x200000 is big enough on GNU/Linux, other systems may
need a larger number. */