Subject: kern/8360: sys/systm.h contains prototypes which are also in libkern.h
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Anders.Hjalmarsson@economics.gu.se>
List: netbsd-bugs
Date: 09/09/1999 13:11:32
>Number:         8360
>Category:       kern
>Synopsis:       sys/systm.h contains prototypes which are also in libkern.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep  9 12:35:02 1999
>Last-Modified:
>Originator:     Anders Hjalmarsson
>Organization:
>Release:        current-19990907
>Environment:
System: NetBSD econahja.econ.gu.se 1.4K NetBSD 1.4K (ECONAHJA) #167: Sun Sep 5 11:01:02 CEST 1999 econahja@econahja.econ.gu.se:/usr/src/sys/arch/i386/compile/ECONAHJA i386


>Description:
	sys/systm.h contains prototypes for the mem*() functions, it
	also includes libkern.h which contains prototypes for the
	mem*() functions (except memcmp, that must be a bug)

>How-To-Repeat:
	Read the source, or use -Wredundant-decls
>Fix:

	Remove mem*() prototypes from sys/systm.h, add memcmp() prototype
	to libkern.h. Remove #ifdef'd out prototypes for b*() functions
	in sys/systm.h they (except bcopy) are also in libkern.h

--- sys/sys/systm.h.orig	Fri Jul  2 01:16:08 1999
+++ sys/sys/systm.h	Thu Sep  9 21:09:34 1999
@@ -192,18 +192,6 @@
 
 void	tablefull __P((const char *));
 
-void	*memchr __P((const void *, int, size_t));
-int      memcmp __P((const void *, const void *, size_t));
-void    *memcpy __P((void *, const void *, size_t));
-void    *memmove __P((void *, const void *, size_t));
-void    *memset __P((void *, int, size_t));
-
-/* XXX b*() are now macros. should remove these prototypes soon */
-#if 0
-void	bcopy __P((const void *, void *, size_t));
-void	bzero __P((void *, size_t));
-int	bcmp __P((const void *, const void *, size_t));
-#endif
 int	kcopy __P((const void *, void *, size_t));
 
 #define bcopy(src, dst, len)	memcpy(dst, src, len)



--- sys/lib/libkern/libkern.h.orig	Fri May 21 23:22:01 1999
+++ sys/lib/libkern/libkern.h	Thu Sep  9 21:09:38 1999
@@ -155,6 +155,7 @@
 void	 bzero __P((void *, size_t));
 int	 ffs __P((int));
 void	*memchr __P((const void *, int, size_t));
+int	 memcmp __P((const void *, const void *, size_t));
 void	*memcpy __P((void *, const void *, size_t));
 void	*memmove __P((void *, const void *, size_t));
 void	*memset __P((void *, int, size_t));
>Audit-Trail:
>Unformatted: