From: VMware, Inc <> Date: Fri, 12 Apr 2013 19:38:59 +0000 (-0700) Subject: Make Str_Snprintf_C_locale work again X-Git-Tag: 2013.04.16-1098359~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3097a09ec1c461ab247e705c78f219981d71a036;p=thirdparty%2Fopen-vm-tools.git Make Str_Snprintf_C_locale work again 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 --- diff --git a/open-vm-tools/lib/string/bsd_vsnprintf.c b/open-vm-tools/lib/string/bsd_vsnprintf.c index 9b88f5805..0c90e03fb 100644 --- a/open-vm-tools/lib/string/bsd_vsnprintf.c +++ b/open-vm-tools/lib/string/bsd_vsnprintf.c @@ -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.