Bug 565089 - Allow cairo to build on Android. r=jmuizelaar,ted

This commit is contained in:
Michael Wu 2010-05-25 15:21:18 -07:00
Родитель b00f08c5dd
Коммит dc3db854dc
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -4563,7 +4563,9 @@ AC_CACHE_CHECK(for LC_MESSAGES,
ac_cv_i18n_lc_messages=no)]) ac_cv_i18n_lc_messages=no)])
if test "$ac_cv_i18n_lc_messages" = yes; then if test "$ac_cv_i18n_lc_messages" = yes; then
AC_DEFINE(HAVE_I18N_LC_MESSAGES) AC_DEFINE(HAVE_I18N_LC_MESSAGES)
fi fi
AC_HAVE_FUNCS(localeconv)
fi # SKIP_COMPILER_CHECKS fi # SKIP_COMPILER_CHECKS
@ -4610,6 +4612,7 @@ if test -n "$SKIP_COMPILER_CHECKS"; then
dnl Windows has malloc.h dnl Windows has malloc.h
AC_DEFINE(MALLOC_H, [<malloc.h>]) AC_DEFINE(MALLOC_H, [<malloc.h>])
AC_DEFINE(HAVE_FORCEINLINE) AC_DEFINE(HAVE_FORCEINLINE)
AC_DEFINE(HAVE_LOCALECONV)
fi # SKIP_COMPILER_CHECKS fi # SKIP_COMPILER_CHECKS
dnl ======================================================== dnl ========================================================

Просмотреть файл

@ -311,9 +311,14 @@ _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precisi
if (d == 0.0) if (d == 0.0)
d = 0.0; d = 0.0;
#ifdef HAVE_LOCALECONV
locale_data = localeconv (); locale_data = localeconv ();
decimal_point = locale_data->decimal_point; decimal_point = locale_data->decimal_point;
decimal_point_len = strlen (decimal_point); decimal_point_len = strlen (decimal_point);
#else
decimal_point = ".";
decimal_point_len = 1;
#endif
assert (decimal_point_len != 0); assert (decimal_point_len != 0);