Bug 11410 - wctype.h should get wint_t from wchar.h?
Summary: wctype.h should get wint_t from wchar.h?
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.11
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-20 20:51 UTC by Marc Glisse
Modified: 2014-06-30 18:25 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Glisse 2010-03-20 20:51:00 UTC
Hello,

currently, wctype.h gets the definition of wint_t as follows:

/* Get wint_t from <stddef.h>.  */
# define __need_wint_t
# include <stddef.h>

On the other hand, wchar.h (which also supports inclusion with __need_wint_t) 
has a more elaborate strategy that works around gcc versions (and other 
compilers) that don't define wint_t (there is also mention of some namespace 
issue). Is it possible to change wctype.h to use the following?

/* Get wint_t from <wchar.h>.  */
# define __need_wint_t
# include <wchar.h>
Comment 1 Ulrich Drepper 2010-03-24 14:00:32 UTC
I might reverse the change because it is dangerous to not use the definition
from stddef.h but for now I changed it along the lines suggested.