libc++: Add locale-specific wrappers for C library functions.

This patch adds trivial stubs to implement extended C library functions
like strcoll_l() by calling the respective non-locale specific function
(e.g. strcoll() in this example).

On Android, only the C/POSIX locale is supported. It might be useful
in the future to improve the implementation by allowing it to use
the platform APIs to implement all locale-specific operations properly.

However, this requires a JavaVM handle that cannot be accessed from
generic native code (the only way to get it is really through the
JNI_OnLoad() hook when loading a shared library with Dalvik).

This can be solved by doing some sort of lazy initialization, i.e.:

  1/ At first, only support the usual C/POSIX locale.

  2/ Provide a function like init_android_vm(JavaVM* vm) that can
     be called by client code to enable better locales.

Still a lot of work, so for the future.

Change-Id: I84268edaf9c3d4ad0d4ee237e270cbe1f0b6d58f
13 files changed