diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2014-03-24 19:08:10 +1030 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2014-09-23 11:40:03 -0700 |
commit | 9a19ef185884da1e7d5344b301f48aa2ba0f88b6 (patch) | |
tree | 39f752f1e4746d2d9f601eebaf7af04d88812488 /src/cairo-output-stream.c | |
parent | a02e29a12d82f177bdf99ed8cfd0c3b3b78c44da (diff) | |
download | cairo-9a19ef185884da1e7d5344b301f48aa2ba0f88b6.tar.gz |
Fix compilation with bionic libc
Refactor out a cairo_get_locale_decimal_point() routine to handle a case
where localeconv() is not available.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=70492
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
[edit: Condensed cairo_get_locale_decimal_point and conditionalized
locale.h inclusion. -- bryce]
Diffstat (limited to 'src/cairo-output-stream.c')
-rw-r--r-- | src/cairo-output-stream.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c index 6d6c180c6..369a59bfb 100644 --- a/src/cairo-output-stream.c +++ b/src/cairo-output-stream.c @@ -43,7 +43,6 @@ #include "cairo-compiler-private.h" #include <stdio.h> -#include <locale.h> #include <errno.h> /* Numbers printed with %f are printed with this number of significant @@ -303,7 +302,6 @@ _cairo_output_stream_write_hex_string (cairo_output_stream_t *stream, static void _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precision) { - struct lconv *locale_data; const char *decimal_point; int decimal_point_len; char *p; @@ -314,8 +312,7 @@ _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precisi if (d == 0.0) d = 0.0; - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; + decimal_point = cairo_get_locale_decimal_point (); decimal_point_len = strlen (decimal_point); assert (decimal_point_len != 0); |