Mercurial > hg > octave-nkf > gnulib-hg
changeset 17882:19306e4f6768
localename: support Solaris 12 and illumos
* lib/localename.c (gl_locale_name_thread_unsafe): call
getlocalename_l() on newer __sun platforms.
Reported by Alexander Pyhalov.
Fix suggested by Rich Burridge.
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Thu, 29 Jan 2015 16:44:48 +0000 |
parents | 386b1175b738 |
children | c7cacca49e3b |
files | ChangeLog lib/localename.c |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-01-29 Pádraig Brady <P@draigBrady.com> + + localename: support Solaris 12 and illumos + * lib/localename.c (gl_locale_name_thread_unsafe): call + getlocalename_l() on newer __sun platforms. + Reported by Alexander Pyhalov. + Fix suggested by Rich Burridge. + 2015-01-29 Alexander Pyhalov <alp@rsu.ru> locale: fix tests on illumos (trivial)
--- a/lib/localename.c +++ b/lib/localename.c @@ -42,6 +42,10 @@ # if !defined IN_LIBINTL # include "glthread/lock.h" # endif +# if defined __sun +/* Solaris >= 12. */ +extern char * getlocalename_l(int, locale_t); +# endif #endif #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE @@ -2584,7 +2588,7 @@ #endif -#if HAVE_USELOCALE /* glibc or Mac OS X */ +#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */ /* Simple hash set of strings. We don't want to drag in lots of hash table code here. */ @@ -2723,6 +2727,9 @@ return ""; } return querylocale (mask, thread_locale); +# elif defined __sun + /* Solaris >= 12. */ + return getlocalename_l (category, thread_locale); # endif } }