Hey Eric,
It does indeed seem strange. From the wchar.h source code in Bionic:
* IMPORTANT: Any code that relies on wide character support is essentially
* non-portable and/or broken. the only reason this header exist
* is because I'm really a nice guy. However, I'm not nice enough
* to provide you with a real implementation. instead wchar_t == char
* and all wc functions are stubs to their "normal" equivalent...
*/
Basically, there is no support for wchar in Android's libc. What you
get is a char, the stub header only exists to keep stdlib.h happy
(even though it is not used). I think that depending on wchar will be
a problem for you when porting, as hinted by the Unicode standard
spec:
"The width of wchar_t is compiler-specific and can be as small as 8
bits. Consequently, programs that need to be portable across any C or
C++ compiler should not use wchar_t for storing Unicode text. The
wchar_t type is intended for storing compiler-defined wide characters,
which may be Unicode characters in some compilers."
I suggest you convert your wchar references to char. If you need
unicode support, then you'll need an alternative solution to the wchar
datatype when building for Android. It's not ideal, but I guess it's
the nature of these things.