if ( SvNOK(ver) ) /* may get too much accuracy */
{
char tbuf[64];
+#ifdef USE_LOCALE_NUMERIC
+ char *loc = setlocale(LC_NUMERIC, "C");
+#endif
const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+ setlocale(LC_NUMERIC, loc);
+#endif
version = savepvn(tbuf, len);
}
else
{
char tbuf[64];
STRLEN len;
- SET_NUMERIC_STANDARD();
+#ifdef USE_LOCALE_NUMERIC
+ char *loc = setlocale(LC_NUMERIC, "C");
+#endif
len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver));
- SET_NUMERIC_LOCAL();
+#ifdef USE_LOCALE_NUMERIC
+ setlocale(LC_NUMERIC, loc);
+#endif
while (tbuf[len-1] == '0' && len > 0) len--;
version = savepvn(tbuf, len);
}