* [PATCH] wctob: mbtowc is declared in <stdlib.h>
@ 2019-09-10 7:05 Florian Weimer
2019-09-10 12:55 ` Bruno Haible
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2019-09-10 7:05 UTC (permalink / raw)
To: bug-gnulib
* 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 ()
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wctob: mbtowc is declared in <stdlib.h>
2019-09-10 7:05 [PATCH] wctob: mbtowc is declared in <stdlib.h> Florian Weimer
@ 2019-09-10 12:55 ` Bruno Haible
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2019-09-10 12:55 UTC (permalink / raw)
To: bug-gnulib; +Cc: Florian Weimer
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 <bruno@clisp.org>
wctob: Fix autoconf test.
Based on patch by Florian Weimer <fweimer@redhat.com>.
* 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>.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-10 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 7:05 [PATCH] wctob: mbtowc is declared in <stdlib.h> Florian Weimer
2019-09-10 12:55 ` Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).