changeset 12526:01da2b836972

Fix compilation error on most platforms.
author Bruno Haible <bruno@clisp.org>
date Thu, 31 Dec 2009 02:28:19 +0100
parents 53f80a530574
children bf645800d5b3
files ChangeLog tests/test-localename.c
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-30  Bruno Haible  <bruno@clisp.org>
+
+	Fix compilation error on most platforms.
+	* tests/test-localename.c (categories): Define only if HAVE_NEWLOCALE.
+	Reported by Simon Josefsson <simon@josefsson.org>
+	and Nelson H. F. Beebe <beebe@math.utah.edu>.
+
 2009-12-30  Eric Blake  <ebb9@byu.net>
 
 	futimens, utimensat: work around ntfs-3g bug
--- a/tests/test-localename.c
+++ b/tests/test-localename.c
@@ -26,6 +26,9 @@
 
 #include "macros.h"
 
+
+#if HAVE_NEWLOCALE
+
 static struct { int cat; int mask; const char *string; } const categories[] =
   {
       { LC_CTYPE,          LC_CTYPE_MASK,          "LC_CTYPE" },
@@ -54,6 +57,8 @@
 # endif
   };
 
+#endif
+
 /* Test the gl_locale_name() function.  */
 static void
 test_locale_name (void)