]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Make Str_Snprintf_C_locale work again
authorVMware, Inc <>
Fri, 12 Apr 2013 19:38:59 +0000 (12:38 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Wed, 17 Apr 2013 19:16:42 +0000 (12:16 -0700)
It looks like previous change has broken the C_locale friendly print
function, namely it changes things back to using the localeconv() table.
This seems to have been done in the name of making android work,
however, it breaks our ability to correctly generate shaders on systems
when the locale uses "," to denote a decimal point.  This change reverts
that bit of behaviour so that the bsd_vsnprintf function uses the
provided decimal point unless we're on android.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/string/bsd_vsnprintf.c

index 9b88f580571810af9b731225de26c1119511b1bc..0c90e03fbb3a20d8ec7b24be0bc3329f611e9713 100644 (file)
@@ -627,9 +627,7 @@ bsd_vsnprintf_core(char **outbuf,
    convbuf = NULL;
 #if !defined(NO_FLOATING_POINT)
    dtoaresult = NULL;
-#if !defined __ANDROID__
-   decimal_point = localeconv()->decimal_point;
-#else
+#ifdef __ANDROID__
    /*
     * Struct lconv is not working! For decimal_point,
     * using '.' instead is a workaround.