From owner-freebsd-net Sat Oct 7 11:25:57 2000 Delivered-To: freebsd-net@freebsd.org Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (Postfix) with ESMTP id D79AB37B502; Sat, 7 Oct 2000 11:25:53 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.10.0/8.10.0) id e97IPrt01259; Sat, 7 Oct 2000 11:25:53 -0700 (PDT) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma001257; Sat, 7 Oct 2000 11:25:38 -0700 Received: (from archie@localhost) by bubba.whistle.com (8.11.0/8.11.0) id e97IPcE01449; Sat, 7 Oct 2000 11:25:38 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200010071825.e97IPcE01449@bubba.whistle.com> Subject: header bogosity in To: freebsd-net@freebsd.org, developers@freebsd.org Date: Sat, 7 Oct 2000 11:25:38 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In the following appears: #ifndef _KERNEL #define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n)) #define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n)) #define Bzero(p, n) bzero((char *)(p), (int)(n)); #define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n))) #define Free(p) free((char *)p); #else #define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n)) #define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n)) #define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n)); #define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT)) #define Free(p) free((caddr_t)p, M_RTABLE); #endif /* _KERNEL */ Isn't this bogus? For example, it conflicts with any program that #defines Free() for itself. Apparenly some of these C files (sys/net/radix.c, sys/net/route.c, sys/net/rtsock.c) are used in both kernel and userland compilation. What is the correct way to do this? Thanks, -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message