summaryrefslogtreecommitdiff
path: root/include/stddef.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2016-09-09 18:12:38 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2016-09-09 18:12:38 +0000
commit25fbe837102197e671c7fff2204cced3153d7861 (patch)
treeb130c345c40148b9b05844117ae8642e1bdc09ea /include/stddef.h
parentc3304e434d26f042ef8e1e6d4309657e6aff0164 (diff)
Move the 10 (!) defintions of NULL to their own mini header file and
update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
Diffstat (limited to 'include/stddef.h')
-rw-r--r--include/stddef.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/include/stddef.h b/include/stddef.h
index 52b2b39dad6..88bd55f1749 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stddef.h,v 1.12 2011/07/03 18:51:01 jsg Exp $ */
+/* $OpenBSD: stddef.h,v 1.13 2016/09/09 18:12:37 millert Exp $ */
/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */
/*-
@@ -36,6 +36,7 @@
#define _STDDEF_H_
#include <sys/cdefs.h>
+#include <sys/_null.h>
#include <sys/_types.h>
#ifndef _PTRDIFF_T_DEFINED_
@@ -64,16 +65,6 @@ typedef __wint_t wint_t;
typedef __mbstate_t mbstate_t;
#endif
-#ifndef NULL
-#ifdef __GNUG__
-#define NULL __null
-#elif defined(__cplusplus)
-#define NULL 0L
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-
#if __GNUC_PREREQ__(4, 0)
#define offsetof(type, member) __builtin_offsetof(type, member)
#else