LWN.net Logo

wchar_t

wchar_t

Posted Apr 21, 2009 0:25 UTC (Tue) by xoddam (subscriber, #2322)
In reply to: wchar_t by tialaramex
Parent article: What's coming in glibc 2.10

wchar_t is 32-bit by default in g++ and in the stddef.h usually used by gcc.

There is a g++ compiler option -fshort-wchart to change the intrinsic type in C++, and you can use alternative headers or pre-define "-D__WCHAR_T__=uint16_t" for C, but this is pretty unusual on Linux except when cross-compiling for another platform (or building WINE).


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds