summaryrefslogtreecommitdiff
path: root/include/unistd.h
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-06-11 22:47:49 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-06-11 22:47:49 +0000
commit25018aae1e7a8c2288f61c32416e8d3c083a479f (patch)
tree1c6ccf39bfe7ab1508da3896c13a7920df0f267b /include/unistd.h
parent5d30b9dd685cc89d485c7ec3f358e239e00bfe45 (diff)
Define NULL to be __null for C++: better quality of implementation.
__null is a magic constant of integral type that converts to a null pointer as should be, but warns for ambiguity when used to resolved an overload between an integral type and a pointer type.
Diffstat (limited to 'include/unistd.h')
-rw-r--r--include/unistd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 0d2b3044638..449295d9b09 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.25 1999/05/22 23:49:48 weingart Exp $ */
+/* $OpenBSD: unistd.h,v 1.26 1999/06/11 22:47:47 espie Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
@@ -48,8 +48,12 @@
#define STDERR_FILENO 2 /* standard error file descriptor */
#ifndef NULL
+#ifdef __GNUG__
+#define NULL __null
+#else
#define NULL 0 /* null pointer constant */
#endif
+#endif
__BEGIN_DECLS
__dead void _exit __P((int)) __attribute__((noreturn));