summaryrefslogtreecommitdiff
path: root/wcsmbs/wchar.h
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wchar.h')
-rw-r--r--wcsmbs/wchar.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 885662b07b..0fd9e35440 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -31,7 +31,7 @@
#ifdef _WCHAR_H
/* Get FILE definition. */
# define __need___FILE
-# ifdef __USE_UNIX98
+# if defined __USE_UNIX98 || defined __USE_XOPEN2K
# define __need_FILE
# endif
# include <stdio.h>
@@ -839,4 +839,9 @@ __END_DECLS
#endif /* _WCHAR_H defined */
+/* Undefined all __need_* constants in case we are included to get those
+ constants but the whole file was already read. */
+#undef __need_mbstate_t
+#undef __need_wint_t
+
#endif /* wchar.h */