summaryrefslogtreecommitdiff
path: root/include/wchar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/wchar.h')
-rw-r--r--include/wchar.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/wchar.h b/include/wchar.h
index 369b1e9f..ed5d774d 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -14,6 +14,10 @@ extern "C" {
#define __NEED_wint_t
#define __NEED_mbstate_t
+#if __STDC_VERSION__ < 201112L
+#define __NEED_struct__IO_FILE
+#endif
+
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_locale_t
@@ -34,7 +38,9 @@ extern "C" {
#define WCHAR_MIN (-1-0x7fffffff+L'\0')
#endif
-#ifdef __cplusplus
+#if __cplusplus >= 201103L
+#define NULL nullptr
+#elif defined(__cplusplus)
#define NULL 0L
#else
#define NULL ((void*)0)