]> Savannah Git Hosting - gnulib.git/commitdiff
locale: fix tests on illumos
authorAlexander Pyhalov <alp@rsu.ru>
Thu, 29 Jan 2015 16:35:24 +0000 (16:35 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 30 Jan 2015 10:59:33 +0000 (10:59 +0000)
* tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos,
so move from global scope to main().

ChangeLog
tests/test-locale.c

index a57bdd0bd04ab99724f751bb9aff177ee204747b..a218b4f1a94b5fa2af561217f2f8f243b651b11d 100644 (file)
--- 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
index 492efb4b2931080d8f1b7c507af31ca5e76403ea..ad1b6791b41de057018bd14d7cafccca1f93101a 100644 (file)
@@ -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);