summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/locale.h4
-rw-r--r--include/stddef.h4
-rw-r--r--include/stdio.h4
-rw-r--r--include/stdlib.h4
-rw-r--r--include/string.h4
-rw-r--r--include/time.h5
-rw-r--r--include/unistd.h4
-rw-r--r--include/wchar.h4
8 files changed, 33 insertions, 0 deletions
diff --git a/include/locale.h b/include/locale.h
index 7e80fd93..ce384381 100644
--- a/include/locale.h
+++ b/include/locale.h
@@ -7,7 +7,11 @@ extern "C" {
#include <features.h>
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#define LC_CTYPE 0
#define LC_NUMERIC 1
diff --git a/include/stddef.h b/include/stddef.h
index 9d522486..0a329190 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -1,7 +1,11 @@
#ifndef _STDDEF_H
#define _STDDEF_H
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#define __NEED_ptrdiff_t
#define __NEED_size_t
diff --git a/include/stdio.h b/include/stdio.h
index cd60bb55..884d2e6a 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -21,7 +21,11 @@ extern "C" {
#include <bits/alltypes.h>
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#undef EOF
#define EOF (-1)
diff --git a/include/stdlib.h b/include/stdlib.h
index 2bd5f102..1e67b896 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -7,7 +7,11 @@ extern "C" {
#include <features.h>
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#define __NEED_size_t
#define __NEED_wchar_t
diff --git a/include/string.h b/include/string.h
index d4412333..ff9badb9 100644
--- a/include/string.h
+++ b/include/string.h
@@ -7,7 +7,11 @@ extern "C" {
#include <features.h>
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#define __NEED_size_t
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
diff --git a/include/time.h b/include/time.h
index 6e499ffe..70574093 100644
--- a/include/time.h
+++ b/include/time.h
@@ -7,7 +7,12 @@ extern "C" {
#include <features.h>
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
+
#define __NEED_size_t
#define __NEED_time_t
diff --git a/include/unistd.h b/include/unistd.h
index a00a9c4f..9f2fac96 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -15,7 +15,11 @@ extern "C" {
#define SEEK_CUR 1
#define SEEK_END 2
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#define __NEED_size_t
#define __NEED_ssize_t
diff --git a/include/wchar.h b/include/wchar.h
index fd5aac5f..9fd967cc 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -33,7 +33,11 @@ extern "C" {
#define WCHAR_MIN (-1-0x7fffffff+L'\0')
#endif
+#ifdef __cplusplus
#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
#undef WEOF
#define WEOF 0xffffffffU