bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: vasnprintf.c Android bug?
Date: Wed, 25 Jan 2023 21:13:53 +0800	[thread overview]
Message-ID: <87r0vi3gfi.fsf@yahoo.com> (raw)
In-Reply-To: <3760176.Lcv68fpRKk@nimes> (Bruno Haible's message of "Wed, 25 Jan 2023 13:44:20 +0100")

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.


  reply	other threads:[~2023-01-25 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87a627487f.fsf.ref@yahoo.com>
2023-01-25  3:13 ` vasnprintf.c Android bug? Po Lu
2023-01-25 12:44   ` Bruno Haible
2023-01-25 13:13     ` Po Lu [this message]
2023-01-28 18:42   ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0vi3gfi.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).