[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vasnprintf.c Android bug?
From: |
Po Lu |
Subject: |
Re: vasnprintf.c Android bug? |
Date: |
Wed, 25 Jan 2023 21:13:53 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Bruno Haible <bruno@clisp.org> writes:
> Hi,
>
> Po Lu wrote:
>> With the build API version set to 21 on the NDK r26b, vasnprintf.c needs
>> to include:
>>
>> #include <wchar.h>
>>
>> or else it cannot find mbstate_t.
>
> Thanks for the report. This patch should fix it.
>
>
> 2023-01-25 Bruno Haible <bruno@clisp.org>
>
> vasnprintf: Fix compilation error on Android NDK r26b.
> Reported by Po Lu <luangruo@yahoo.com>.
> * lib/vasnprintf.c: Include <wchar.h>.
>
> diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
> index ab11ad026e..277c39e3e0 100644
> --- a/lib/vasnprintf.c
> +++ b/lib/vasnprintf.c
> @@ -83,6 +83,7 @@
> #include <stdio.h> /* snprintf(), sprintf() */
> #include <stdlib.h> /* abort(), malloc(), realloc(), free() */
> #include <string.h> /* memcpy(), strlen() */
> +#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */
> #include <errno.h> /* errno */
> #include <limits.h> /* CHAR_BIT */
> #include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
Thanks.