# HG changeset patch # User Alexander Pyhalov # Date 1422549324 0 # Node ID 386b1175b7385dd914006b3cf27af0da008c6c56 # Parent 18371cbd9692cf1031025742bbaf103e522f1565 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(). diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-29 Alexander Pyhalov + + 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 unictype: avoid undefined left-shift behavior diff --git a/tests/test-locale.c b/tests/test-locale.c --- 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);