kern/99979: Get Ready for Kernel Module in C++

M. Warner Losh imp at bsdimp.com
Tue Jul 11 16:18:03 UTC 2006


In message: <1152612305.19369 at origin.intron.ac>
            mag at 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


More information about the freebsd-hackers mailing list