From dfe49c94d31614a305abf2f34937647af36ddd88 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Thu, 29 Jan 2015 16:35:24 +0000 Subject: [PATCH] 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(). --- ChangeLog | 6 ++++++ tests/test-locale.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a57bdd0bd0..a218b4f1a9 100644 --- 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 index 492efb4b29..ad1b6791b4 100644 --- a/tests/test-locale.c +++ b/tests/test-locale.c @@ -33,11 +33,6 @@ int a[] = 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 @@ verify (sizeof NULL == sizeof (void *)); 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); -- 2.39.5