Mercurial > hg > octave-jordi > gnulib-hg
changeset 17881:386b1175b738
locale: fix tests on illumos
* tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos,
so move from global scope to main().
author | Alexander Pyhalov <alp@rsu.ru> |
---|---|
date | Thu, 29 Jan 2015 16:35:24 +0000 |
parents | 18371cbd9692 |
children | 19306e4f6768 |
files | ChangeLog tests/test-locale.c |
diffstat | 2 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-29 Alexander Pyhalov <alp@rsu.ru> + + locale: fix tests on illumos (trivial) + * tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos, + so move from global scope to main(). + 2015-01-24 Daiki Ueno <ueno@gnu.org> unictype: avoid undefined left-shift behavior
--- a/tests/test-locale.c +++ b/tests/test-locale.c @@ -33,11 +33,6 @@ LC_TIME }; -#if HAVE_NEWLOCALE -/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ -locale_t b = LC_GLOBAL_LOCALE; -#endif - /* Check that the 'struct lconv' type is defined. */ struct lconv l; int ls; @@ -49,6 +44,11 @@ int main () { +#if HAVE_NEWLOCALE + /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ + locale_t b = LC_GLOBAL_LOCALE; +#endif + /* Check that 'struct lconv' has the ISO C and POSIX specified members. */ ls += sizeof (*l.decimal_point); ls += sizeof (*l.thousands_sep);