[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] wctob: mbtowc is declared in <stdlib.h>
From: |
Bruno Haible |
Subject: |
Re: [PATCH] wctob: mbtowc is declared in <stdlib.h> |
Date: |
Tue, 10 Sep 2019 14:55:39 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-159-generic; KDE/5.18.0; x86_64; ; ) |
Florian Weimer wrote:
> * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h>.
> ---
> m4/wctob.m4 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/m4/wctob.m4 b/m4/wctob.m4
> index 05c1237ee..90de3e8ad 100644
> --- a/m4/wctob.m4
> +++ b/m4/wctob.m4
> @@ -81,6 +81,7 @@ int main ()
> included before <wchar.h>. */
> #include <stddef.h>
> #include <stdio.h>
> +#include <stdlib.h>
> #include <time.h>
> #include <wchar.h>
> int main ()
>
Thanks, I applied this in a slightly different place:
2019-09-10 Bruno Haible <address@hidden>
wctob: Fix autoconf test.
Based on patch by Florian Weimer <address@hidden>.
* m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 05c1237..a906828 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,4 +1,4 @@
-# wctob.m4 serial 11
+# wctob.m4 serial 12
dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -74,6 +74,7 @@ int main ()
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
+#include <stdlib.h>
#include <string.h>
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.