[cfe-commits] [PATCH] 7571: stddef.h and wint_t

Zhongxing Xu xuzhongxing at gmail.com
Tue Jul 27 23:00:48 PDT 2010


Could this patch go in?

On Fri, Jul 9, 2010 at 4:10 PM, Jay Foad <jay.foad at gmail.com> wrote:
> http://llvm.org/bugs/show_bug.cgi?id=7571
>
> On Ubuntu I get:
>
> $ cat c.c
> #include <stddef.h>
> #include <wctype.h>
> $ clang -c c.c
> In file included from c.c:2:
> /usr/include/wctype.h:112:22: error: unknown type name 'wint_t'
> extern int iswalnum (wint_t __wc) __THROW;
>                     ^
> ...
>
> The problem is that Clang's stddef.h only defines win_t if
> __need_wint_t is defined the *first* time stddef.h is included.
> Glibc's wctype.h does this:
>
> /* Get wint_t from <stddef.h>.  */
> # define __need_wint_t
> # include <stddef.h>
>
> but that doesn't work if stddef.h has been included previously.
>
> I've attached a suggested fix.
>
> Thanks,
> Jay.
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>




More information about the cfe-commits mailing list