aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_null.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-05-11 21:13:00 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-05-11 21:13:00 +0000
commit92919e4a54c1c2df2cca7eab38c96c6916d584e1 (patch)
tree8fadfe4900a5277c7b830389a67490be814b9c21 /sys/sys/_null.h
parent3b616faed5ded69bf68eac48a02371c4b961795e (diff)
downloadsrc-92919e4a54c1c2df2cca7eab38c96c6916d584e1.tar.gz
src-92919e4a54c1c2df2cca7eab38c96c6916d584e1.zip
*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.
Notes
Notes: svn path=/head/; revision=192002
Diffstat (limited to 'sys/sys/_null.h')
-rw-r--r--sys/sys/_null.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
index b53c1b236983..ed6804ccd10e 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