changing definition of NULL to ((void *)0) for C

Sascha Wildner saw at online.de
Mon Jun 2 13:24:53 PDT 2008


Hi all,

the following patch will add <sys/_null.h> which defines NULL as 0 for 
C++ and as ((void *)0) for C, similar to FreeBSD. Currently NULL is 
always 0 (except for a few things which redefine it).

The remainder of the patch changes our headers to #include <sys/_null.h> 
where NULL was defined previously and fixes a number of warnings which 
cropped up once NULL was void *. It also removes some casts of NULL to 
void * which are currently needed to "fix" the "missing sentinel in 
function call" warnings.

http://leaf.dragonflybsd.org/~swildner/NULL.diff

If no one objects, I'll commit this on Thursday.

Sascha

--
http://yoyodyne.ath.cx




More information about the Kernel mailing list