From 9688eae82d1c9cf4e3c7d7460f7fcba935438029 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 5 Mar 2015 19:33:40 +0000
Subject: Haiku patch


diff --git a/configure.ac b/configure.ac
index 38fe5dd..5a822de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 . $srcdir/version.sh
 gl_INIT_PACKAGE([libunistring], [$VERSION_NUMBER])
 AM_INIT_AUTOMAKE([silent-rules dist-xz])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 
 dnl Override automake's tar command used for creating distributions.
 am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"'
diff --git a/lib/uniname/uniname.c b/lib/uniname/uniname.c
index 2191f09..fc2727c 100644
--- a/lib/uniname/uniname.c
+++ b/lib/uniname/uniname.c
@@ -375,6 +375,8 @@ unicode_name_character (const char *name)
       if (false)
       filled_buf:
         {
+          uint16_t words[UNICODE_CHARNAME_MAX_WORDS];
+          uint16_t *wordptr = words;
           {
             /* Special case for variation selector aliases. Keeps the
                tables small.  */
@@ -407,8 +409,6 @@ unicode_name_character (const char *name)
               }
           }
           /* Convert the constituents to uint16_t words.  */
-          uint16_t words[UNICODE_CHARNAME_MAX_WORDS];
-          uint16_t *wordptr = words;
           {
             const char *p1 = buf;
             for (;;)
-- 
1.8.3.4

