diff options
author | jhb <jhb@FreeBSD.org> | 2009-05-11 21:13:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-05-11 21:13:00 +0000 |
commit | 643f391eba2d809710687b0b9027193c1d4e8352 (patch) | |
tree | 8fadfe4900a5277c7b830389a67490be814b9c21 /sys/sys/_null.h | |
parent | 60c4168558aba672e3503dbf2be06d5380c84d11 (diff) | |
download | FreeBSD-src-643f391eba2d809710687b0b9027193c1d4e8352.zip FreeBSD-src-643f391eba2d809710687b0b9027193c1d4e8352.tar.gz |
*sigh*, while the kernel built, userland C did not. Revert the previous
commit and fix it correctly by removing the _KERNEL check entirely. Now
the kernel always sees the same value of NULL as userland meaning that it
sees __null, 0, or 0L when compiled as C++, and '(void *)0' when compiled
as C.
Diffstat (limited to 'sys/sys/_null.h')
-rw-r--r-- | sys/sys/_null.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/_null.h b/sys/sys/_null.h index b53c1b2..ed6804c 100644 --- a/sys/sys/_null.h +++ b/sys/sys/_null.h @@ -28,18 +28,18 @@ #ifndef NULL +#if !defined(__cplusplus) +#define NULL ((void *)0) +#else #if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 #define NULL __null #else -#if defined(_KERNEL) && !defined(__cplusplus) -#define NULL ((void *)0) -#else #if defined(__LP64__) #define NULL (0L) #else #define NULL 0 #endif /* __LP64__ */ -#endif /* _KERNEL && !__cplusplus */ #endif /* __GNUG__ */ +#endif /* !__cplusplus */ #endif |