mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Added check for whether there is any useful information in
struct lconv. Android doesn't have anything there, despite having locale.h, so it makes little sense to try to access the nonexistent fields in GSLocale.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36632 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e34b48653b
commit
b2129096ab
3 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-05-16 Ivan Vučica <ivan@vucica.net>
|
||||
|
||||
* Source/GSLocale.m:
|
||||
* configure.ac:
|
||||
Added check for whether there is any useful information in
|
||||
struct lconv. Android doesn't have anything there, despite
|
||||
having locale.h, so it makes little sense to try to access
|
||||
the nonexistent fields in GSLocale.m
|
||||
|
||||
2013-05-16 Ivan Vučica <ivan@vucica.net>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -46,7 +46,9 @@ GSSetLocale(int category, NSString *locale)
|
|||
return nil;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#if defined(HAVE_LOCALE_H) && defined(HAVE_CURRENCY_SYMBOL_IN_LCONV)
|
||||
/* There is little point in using locale.h if no useful information
|
||||
is exposed through struct lconv. An example platform is Android. */
|
||||
|
||||
#include <locale.h>
|
||||
#ifdef HAVE_LANGINFO_H
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -2099,6 +2099,19 @@ if test "x$ac_cv_have_pw_gecos_in_struct_passwd" = "xyes" ; then
|
|||
[Define if you have pw_gecos field in struct passwd])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for currency_symbol field in struct lconv],
|
||||
ac_cv_have_currency_symbol_in_struct_lconv, [
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <locale.h> ]],
|
||||
[[ struct lconv l; l.currency_symbol = NULL; ]])],
|
||||
[ ac_cv_have_currency_symbol_in_struct_lconv="yes" ],
|
||||
[ ac_cv_have_currency_symbol_in_struct_lconv="no"
|
||||
])
|
||||
])
|
||||
if test "x$ac_cv_have_currency_symbol_in_struct_lconv" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_CURRENCY_SYMBOL_IN_LCONV], [1],
|
||||
[Define if you have currency_symbol field in struct lconv])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These two headers (functions) needed by Time.m
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue