aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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)
tree53e44c4b6ff7f83f759d706b3169d0ba9b0b16a9
parent3957ebe486e95d3cdbde5ee502e16aa290080c8a (diff)
downloadsrc-b6d5c5e83a9c382a996c25d37dee53d3aa74eabe.tar.gz
src-b6d5c5e83a9c382a996c25d37dee53d3aa74eabe.zip
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
Notes: svn path=/stable/3/; revision=96634
-rw-r--r--sys/i386/i386/i386-gdbstub.c9
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)