Author loewis
Recipients loewis, srid
Date 2009-06-30.05:38:13
SpamBayes Score 2.51347e-11
Marked as misclassified No
Message-id <>
In-reply-to <>
> `mbstate_t` seems to exist in /usr/include/wchar.h

I can't infer that from the copy of wchar.h that you provided. I
see that mbstate_t* is used, but I fail to find any definition
of mbstate_t.

I see that sys/_mbstate_t.h is included. This inclusion is conditional
on  _INCLUDE__STDC_A1_SOURCE, so a first check should be done whether
this is defined. In addition, it would be interesting to know what
_mbstate_t.h contains.

> bash-2.04$ cat test.c
> #include <wchar.h>
> int main()
> {
>   mbstate_t foo;
>   printf("Init\n");
>   mbrtowc(NULL, "", 1, NULL);
> }

It's best to focus on this example. Produce preprocessor output for
it, and attach that to the bug report.

This is standard C, AFAICT, so if the compiler fails to compile
it, something is wrong with the compiler, or you are using it incorrectly.

As a wild guess, try defining _XOPEN_SOURCE to 500, i.e.

> cf.

I don't think this is relevant. Somehow, they managed to #define
mbstate_t to int, breaking the header - this should not happen here.
Date User Action Args
2009-06-30 05:38:16loewissetrecipients: + loewis, srid
2009-06-30 05:38:15loewislinkissue5999 messages
2009-06-30 05:38:13loewiscreate