Fix handling of __need_mbstate_t and __need_wint_t.
authorUlrich Drepper <drepper@redhat.com>
Sat, 27 Mar 2010 13:06:35 +0000 (06:06 -0700)
committerUlrich Drepper <drepper@redhat.com>
Sat, 27 Mar 2010 13:06:35 +0000 (06:06 -0700)
Like the real header, the libc-internal wrapper for wchar.h needs to
undefine the macros so that if the header was already included before
the macros don't stay defined and cause problems later.

ChangeLog
include/wchar.h

index 0969ca2de1da5d218f83f28f4cafb3224b92b4cc..d06b956810a5d5f610e6c01d869a73de063a3bd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-03-27  Ulrich Drepper  <drepper@redhat.com>
 
+       * include/wchar.h: Undefine __need_mbstate_t and __need_wint_t
+       unconditionally in the end.
+
        * posix/glob.c (glob): Initialize oldcount early, too.
 
 2010-03-26  Ulrich Drepper  <drepper@redhat.com>
index bca847731daac918f20e6bf73cfef6a30e9c9c55..3afe0b6e2ef54eed4b467c21f95db222d12a53c5 100644 (file)
@@ -195,3 +195,8 @@ extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
 
 # endif
 #endif
+
+/* Undefine 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