Re: again: sizeof(wchar_t)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Artem,

Use:
#if WCHAR_BITSIZE == 16
blah blah blah
#elif WCHAR_BITSIZE == 32
blah blah blah
#else
#error Unsupported/unknown wchar_t bitsize.
#endif

When you are compiling your code with 32-bit wchar_t:
g++ -DWCHAR_BITSIZE=32 foo.cpp

When you are compiling your code with 16-bit wchar_t:
g++ -DWCHAR_BITSIZE=16 foo.cpp

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux