summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-04 16:17:05 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-04 16:17:05 +0000
commitfa5be3dd31e57a10722ef88bf4366845d2190e04 (patch)
treed6db759c9a121bbcfc50b78390f944199191d6ea
parentf0ac84170bee6426a78e0d9673cbf553b58a17eb (diff)
fixed bcopy/memcpy conflict by using private mem* routines.
changed generic pointer type to (void *) and, md5 is in libkern, since more than one component of the kernel uses it. what would be better place? well, imagine some lkm that uses md5 someday...
-rw-r--r--sys/lib/libkern/md5.c9
-rw-r--r--sys/sys/md5k.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/lib/libkern/md5.c b/sys/lib/libkern/md5.c
index b008505db72..49304fe7146 100644
--- a/sys/lib/libkern/md5.c
+++ b/sys/lib/libkern/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.4 1997/03/30 22:05:09 mickey Exp $ */
+/* $OpenBSD: md5.c,v 1.5 1997/04/04 16:17:04 mickey Exp $ */
/*
* The rest of the code is derived from MD5C.C by RSADSI. Minor cosmetic
@@ -43,8 +43,9 @@ documentation and/or software.
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/md5k.h>
-
-#define HAVEBCOPY
+#ifdef _STANDALONE
+#include <stand.h>
+#endif
/* Constants for MD5Transform routine.
*/
@@ -363,7 +364,7 @@ unsigned int len;
for (i = 0; i < len; i++)
- output[i] = input[i];
+ ((char *)output)[i] = ((char *)input)[i];
}
/* Note: Replace "for loop" with standard memset if possible.
diff --git a/sys/sys/md5k.h b/sys/sys/md5k.h
index 000d8dae79e..f83472b56a8 100644
--- a/sys/sys/md5k.h
+++ b/sys/sys/md5k.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: md5k.h,v 1.1 1997/03/30 22:05:08 mickey Exp $ */
+/* $OpenBSD: md5k.h,v 1.2 1997/04/04 16:17:02 mickey Exp $ */
/* GLOBAL.H - RSAREF types and constants
*/
/* POINTER defines a generic pointer type */
-typedef unsigned char *POINTER;
+typedef void *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;