From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 11 16:18:03 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68E3116A4DD for ; Tue, 11 Jul 2006 16:18:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50D8B43D72 for ; Tue, 11 Jul 2006 16:18:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6BGGJYc043228; Tue, 11 Jul 2006 10:16:19 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 11 Jul 2006 10:16:28 -0600 (MDT) Message-Id: <20060711.101628.1678774797.imp@bsdimp.com> To: mag@intron.ac From: "M. Warner Losh" In-Reply-To: <1152612305.19369@origin.intron.ac> References: <86fyh8zgw8.fsf@xps.des.no> <1152612305.19369@origin.intron.ac> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 11 Jul 2006 10:16:20 -0600 (MDT) Cc: des@des.no, delphij@delphij.net, julian@elischer.org, freebsd-hackers@freebsd.org Subject: Re: kern/99979: Get Ready for Kernel Module in C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 16:18:03 -0000 In message: <1152612305.19369@origin.intron.ac> mag@intron.ac writes: : >> --- systm.h.orig Mon Jul 10 05:42:58 2006 : >> +++ systm.h Mon Jul 10 18:44:01 2006 : >> @@ -203,7 +203,7 @@ : >> int suword16(void *base, int word); : >> int suword32(void *base, int32_t word); : >> int suword64(void *base, int64_t word); : >> -intptr_t casuptr(intptr_t *p, intptr_t old, intptr_t new); : >> +intptr_t casuptr(intptr_t *p, intptr_t old, intptr_t __new__); : > : > This is a namespace violation. A simpler solution is to leave out : > argument names entirely. : : If the code style permits, I agree with you. : : GCC support library usually uses "namespace" to add various prefixes : to its built-in functions/variables in order to avoid conflicts against : user code. In ELF binary file, built-in functions/variables' names are : much longer than "__new__". See files in : /usr/src/contrib/libstdc++/libsupc++/. __new__ is bogus. _new if you must. Warner