From: Ulrich Drepper Date: Sat, 27 Mar 2010 13:06:35 +0000 (-0700) Subject: Fix handling of __need_mbstate_t and __need_wint_t. X-Git-Tag: upstream/2.30~12927 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9ea2dd05ee1684ca36ce7ee62ac679f391b6a7f;p=external%2Fglibc.git Fix handling of __need_mbstate_t and __need_wint_t. 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. --- diff --git a/ChangeLog b/ChangeLog index 0969ca2..d06b956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-03-27 Ulrich Drepper + * 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 diff --git a/include/wchar.h b/include/wchar.h index bca8477..3afe0b6 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -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