summaryrefslogtreecommitdiff
path: root/include/stdio.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2011-07-03 18:51:02 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2011-07-03 18:51:02 +0000
commitb27e467a0f3fbb2ba1e30b32a18174f170b76ef2 (patch)
tree069f384a9ef9f8857a52d9cdf82b44ad09d73aba /include/stdio.h
parent2b26c94b023e817134a575613754dbb9ecc19518 (diff)
As pointed out by Richard Guenther our definition
of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang). ok miod@
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h
index aeb48f1535c..5304e552ac7 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdio.h,v 1.39 2011/04/06 11:39:42 miod Exp $ */
+/* $OpenBSD: stdio.h,v 1.40 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*-
@@ -58,6 +58,8 @@ typedef __off_t off_t;
#ifndef NULL
#ifdef __GNUG__
#define NULL __null
+#elif defined(__cplusplus)
+#define NULL 0L
#else
#define NULL ((void *)0)
#endif