Module Name:    src
Committed By:   ad
Date:           Wed Jan 29 09:18:26 UTC 2020

Modified Files:
        src/common/lib/libc/string: bcmp.c memcmp.c

Log Message:
Some boot blocks too big now, only compare in big chunks if !_STANDALONE.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/string/bcmp.c
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/string/memcmp.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/bcmp.c
diff -u src/common/lib/libc/string/bcmp.c:1.9 src/common/lib/libc/string/bcmp.c:1.10
--- src/common/lib/libc/string/bcmp.c:1.9	Mon Jan 27 22:22:03 2020
+++ src/common/lib/libc/string/bcmp.c	Wed Jan 29 09:18:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcmp.c,v 1.9 2020/01/27 22:22:03 ad Exp $	*/
+/*	$NetBSD: bcmp.c,v 1.10 2020/01/29 09:18:26 ad Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)bcmp.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: bcmp.c,v 1.9 2020/01/27 22:22:03 ad Exp $");
+__RCSID("$NetBSD: bcmp.c,v 1.10 2020/01/29 09:18:26 ad Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -86,9 +86,11 @@ __RCSID("$NetBSD: bcmp.c,v 1.9 2020/01/2
 int
 bcmp(const void *s1, const void *s2, size_t n)
 {
-	const uintptr_t *b1, *b2;
 	const unsigned char *c1, *c2;
 
+#ifndef _STANDALONE
+	const uintptr_t *b1, *b2;
+
 	b1 = s1;
 	b2 = s2;
 
@@ -105,6 +107,10 @@ bcmp(const void *s1, const void *s2, siz
 
 	c1 = (const unsigned char *)b1;
 	c2 = (const unsigned char *)b2;
+#else
+	c1 = (const unsigned char *)s1;
+	c2 = (const unsigned char *)s2;
+#endif
 
 	if (n != 0) {
 		do {

Index: src/common/lib/libc/string/memcmp.c
diff -u src/common/lib/libc/string/memcmp.c:1.7 src/common/lib/libc/string/memcmp.c:1.8
--- src/common/lib/libc/string/memcmp.c:1.7	Mon Jan 27 22:22:03 2020
+++ src/common/lib/libc/string/memcmp.c	Wed Jan 29 09:18:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: memcmp.c,v 1.7 2020/01/27 22:22:03 ad Exp $	*/
+/*	$NetBSD: memcmp.c,v 1.8 2020/01/29 09:18:26 ad Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 #if 0
 static char sccsid[] = "@(#)memcmp.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: memcmp.c,v 1.7 2020/01/27 22:22:03 ad Exp $");
+__RCSID("$NetBSD: memcmp.c,v 1.8 2020/01/29 09:18:26 ad Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -86,9 +86,11 @@ __RCSID("$NetBSD: memcmp.c,v 1.7 2020/01
 int
 memcmp(const void *s1, const void *s2, size_t n)
 {
-	const uintptr_t *b1, *b2;
 	const unsigned char *c1, *c2;
 
+#ifndef _STANDALONE
+	const uintptr_t *b1, *b2;
+
 	b1 = s1;
 	b2 = s2;
 
@@ -107,6 +109,10 @@ memcmp(const void *s1, const void *s2, s
 
 	c1 = (const unsigned char *)b1;
 	c2 = (const unsigned char *)b2;
+#else
+	c1 = (const unsigned char *)s1;
+	c2 = (const unsigned char *)s2;
+#endif
 
 	if (n != 0) {
 		do {

Reply via email to