diff options
authorBruce Evans <bde@FreeBSD.org>2002-05-15 05:00:24 +0000
committerBruce Evans <bde@FreeBSD.org>2002-05-15 05:00:24 +0000
commitb6d5c5e83a9c382a996c25d37dee53d3aa74eabe (patch)
parent3957ebe486e95d3cdbde5ee502e16aa290080c8a (diff)
MFC (1.12: renamed gdb's private strlen and strlcpy to avoid conflicts
with the public ones declared in a system header). This helps unbreak building RELENG_3 kernels with gcc-3. gcc-2's special (broken) handling of the corresponding builtins apparently prevented detection of the conflicts even when the public functions are declared explicitly.
Notes: svn path=/stable/3/; revision=96634
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index 25e283897da5..76ae270121e2 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -92,6 +92,8 @@
+/* $FreeBSD$ */
#include <sys/param.h>
#include <sys/reboot.h>
#include <sys/systm.h>
@@ -125,10 +127,9 @@ extern jmp_buf db_jmpbuf;
/* Create private copies of common functions used by the stub. This prevents
nasty interactions between app code and the stub (for instance if user steps
into strlen, etc..) */
-/* XXX this is fairly bogus. strlen() and strcpy() should be reentrant,
- and are reentrant under FreeBSD. In any case, our versions should not
- be named the same as the standard versions, so that the address `strlen'
- is unambiguous... */
+#define strlen gdb_strlen
+#define strcpy gdb_strcpy
static int
strlen (const char *s)