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

Dag-Erling Smørgrav des at des.no
Tue Jul 11 08:27:15 UTC 2006


mag at intron.ac writes:
> But prior to long-term discussion, please commit my 4 patches
> firstly.  They are nearly CPP-independent and do no harm to current
> FreeBSD kernel.

We don't do the kind of changes you propose without discussion.

> --- kern.mk.orig	Fri Jun 30 05:15:25 2006
> +++ kern.mk	Mon Jul 10 18:42:43 2006
> @@ -88,7 +88,7 @@
>  .if ${CC} == "icc"
>  CFLAGS+=	-nolib_inline
>  .else
> -CFLAGS+=	-ffreestanding
> +CFLAGS+=	-fno-builtin
>  .endif

Are you sure this is correct?  I'm pretty certain it isn't.  The
kernel's C environment is not a hosted implementation.

> --- 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.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list