units/units-configure-c99.patch

27 lines
790 B
Diff

diff --git a/configure b/configure
index 22c75a6222b06f68..43461d54e59f1568 100755
--- a/configure
+++ b/configure
@@ -3881,7 +3881,7 @@ else
int
main ()
{
-wchar_t *out;char *in;char *res;
+wchar_t *out;char *in;const char *res;
res=setlocale(LC_CTYPE,"");res=in;
mbsrtowcs(out, &res, 2, NULL);
wcswidth(out,2);
diff --git a/configure.ac b/configure.ac
index c728d5c15d16ab2e..cd39f96e39f7d587 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@ AC_CACHE_CHECK([for locale and UTF-8 support], am_cv_utf8,
#include <wchar.h>
#include <locale.h>
#include <langinfo.h>
-], [wchar_t *out;char *in;char *res;
+], [wchar_t *out;char *in;const char *res;
res=setlocale(LC_CTYPE,"");res=in;
mbsrtowcs(out, &res, 2, NULL);
wcswidth(out,2);],