This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wprintf failure when compiled with -fshort-wchar


Small correction.

On Thu, Apr 5, 2012 at 5:36 PM, Alexey Kravets <mr.kayrick@gmail.com> wrote:
>
> Hi guys,
> I have a problem with eglibc-2.14 wprintf function.
> The library has been compiled with ARM cross compiler with
> -fshort-wchar option enabled.
>
> Then, for the following test (also compiled with -fshort-wchar option
> enabled):
>
> #include <stdio.h>
>
> int main(void)
> {
> ?wprintf(L"TEST\n");
> ?return 0;
> }
>
> The output is "??" instead of TEST.
>
> If the test is compiled without -fshort-wchar option, the output is
> fine (it printf TEST string as expected).
The output is empty actually, which makes more sense. The eglibc has
been compiled with short wchar, so the application compiled with long
wchar is binary incompatible with it.
The only problem is the output of the compatible application, which is
"??" instead of "TEST".
>
> Quick debugging showed, that wchar_t size in glibs is 16 bits
> (-fshort-wchar option has been applied to build).
>
> Can you suggest any ways to fix this issue?
> --
> Alexey Kravets
> mr.kayrick@gmail.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]