Module Name: src Committed By: joerg Date: Tue Nov 8 16:52:11 UTC 2011
Modified Files: src/common/lib/libc/string: memcmp.c memset.c memset2.c strcpy.c Log Message: libkern.h maps memcmp, memset and strcpy to the compiler builtins on some platforms, so make sure to #undef them first. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/string/memcmp.c \ src/common/lib/libc/string/memset2.c src/common/lib/libc/string/strcpy.c cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/string/memset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/lib/libc/string/memcmp.c diff -u src/common/lib/libc/string/memcmp.c:1.2 src/common/lib/libc/string/memcmp.c:1.3 --- src/common/lib/libc/string/memcmp.c:1.2 Mon Jun 4 18:19:27 2007 +++ src/common/lib/libc/string/memcmp.c Tue Nov 8 16:52:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: memcmp.c,v 1.2 2007/06/04 18:19:27 christos Exp $ */ +/* $NetBSD: memcmp.c,v 1.3 2011/11/08 16:52:11 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)memcmp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: memcmp.c,v 1.2 2007/06/04 18:19:27 christos Exp $"); +__RCSID("$NetBSD: memcmp.c,v 1.3 2011/11/08 16:52:11 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -48,6 +48,7 @@ __RCSID("$NetBSD: memcmp.c,v 1.2 2007/06 #include <lib/libkern/libkern.h> #endif +#undef memcmp /* * Compare memory regions. */ Index: src/common/lib/libc/string/memset2.c diff -u src/common/lib/libc/string/memset2.c:1.2 src/common/lib/libc/string/memset2.c:1.3 --- src/common/lib/libc/string/memset2.c:1.2 Mon Dec 14 00:39:01 2009 +++ src/common/lib/libc/string/memset2.c Tue Nov 8 16:52:11 2011 @@ -49,11 +49,11 @@ #ifdef _FORTIFY_SOURCE #undef bzero -#undef memset #endif +#undef memset #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: memset2.c,v 1.2 2009/12/14 00:39:01 matt Exp $"); +__RCSID("$NetBSD: memset2.c,v 1.3 2011/11/08 16:52:11 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ /* Index: src/common/lib/libc/string/strcpy.c diff -u src/common/lib/libc/string/strcpy.c:1.2 src/common/lib/libc/string/strcpy.c:1.3 --- src/common/lib/libc/string/strcpy.c:1.2 Mon Jun 4 18:19:27 2007 +++ src/common/lib/libc/string/strcpy.c Tue Nov 8 16:52:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: strcpy.c,v 1.2 2007/06/04 18:19:27 christos Exp $ */ +/* $NetBSD: strcpy.c,v 1.3 2011/11/08 16:52:11 joerg Exp $ */ /* * Copyright (c) 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strcpy.c,v 1.2 2007/06/04 18:19:27 christos Exp $"); +__RCSID("$NetBSD: strcpy.c,v 1.3 2011/11/08 16:52:11 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -45,9 +45,7 @@ __RCSID("$NetBSD: strcpy.c,v 1.2 2007/06 #include <lib/libkern/libkern.h> #endif -#ifdef _FORTIFY_SOURCE #undef strcpy -#endif char * strcpy(char *to, const char *from) Index: src/common/lib/libc/string/memset.c diff -u src/common/lib/libc/string/memset.c:1.8 src/common/lib/libc/string/memset.c:1.9 --- src/common/lib/libc/string/memset.c:1.8 Wed Mar 18 12:25:06 2009 +++ src/common/lib/libc/string/memset.c Tue Nov 8 16:52:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: memset.c,v 1.8 2009/03/18 12:25:06 tsutsui Exp $ */ +/* $NetBSD: memset.c,v 1.9 2011/11/08 16:52:11 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: memset.c,v 1.8 2009/03/18 12:25:06 tsutsui Exp $"); +__RCSID("$NetBSD: memset.c,v 1.9 2011/11/08 16:52:11 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -60,8 +60,8 @@ __RCSID("$NetBSD: memset.c,v 1.8 2009/03 #ifdef _FORTIFY_SOURCE #undef bzero -#undef memset #endif +#undef memset #ifndef __OPTIMIZE_SIZE__ #ifdef BZERO