From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B23B21F47C for ; Sun, 15 Jan 2023 10:11:05 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=NAGVH3xu; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGzyd-0006tZ-Qc; Sun, 15 Jan 2023 05:10:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGzyb-0006tR-PQ for bug-gnulib@gnu.org; Sun, 15 Jan 2023 05:10:57 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGzyW-0003xa-HD for bug-gnulib@gnu.org; Sun, 15 Jan 2023 05:10:54 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1673777450; cv=none; d=strato.com; s=strato-dkim-0002; b=tORW5ii5DINhq9DGoYEy64H/wgo/CJObTQd6EifNR+8QCS4vgaVbSOc8DPputAprCc N9VXjNC+huyEoN8ZpvhmaTXQ+jh9ZAVj7gYJAHvlWzBBr6RCC8HZK4cFUCZNAh2//fol nHMTNlKkJ1vZ9afbb1XZ+ixMgssac6MvcL1ZUqpzjpUiiA6SInJjPi8lW5xhB/lCBZEz P5ZOHSoeP5L0JVvSJwj0T2MOwPK9nkCi2JeZHCfw6INSFDs8ffL9KQps1lzu1m86YrOv VarOm8Whgw4z9UFCc01Y1A9RKFymUCncmvOzBxO+BJKimjKbuQBilvh4YjWeBpqV6Dfl pQgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1673777450; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=sibZea+XUVChLQ7c0OQySkuMUF1D9nE7+pp/PAis4Hs=; b=UmyA5tH+qE0A/M2U5Ea017gBcLna4v00TzWF+6wqCxZWVvNLw/zIJ9TyMq0MFnWNTy YAYn+/iUUQkvhqr8qdzGmM9uuqvl5+NTUHHK45pqxUokOz2av2syiKV7FFgR3oTEr1jB z9C+0P67p/QpfFgCvuAOyVrkXXJORiHabLYDg1ckW+UBcfuB2ByP1TbE1iw2aQL+8TwD DDE63uiXSvkb9C4KEgnGS/CFMSOQeWaq23X5WHdxlnjt9y7KEwtWdfMEd+E0Qm3KpzXs iNojMtMUFk51kkFj7nuBKrF3JgYNKqM02IuMbI0jvnj8NjYdQ5Rh34NLcZu6C3MaSwie 7ggg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1673777450; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=sibZea+XUVChLQ7c0OQySkuMUF1D9nE7+pp/PAis4Hs=; b=NAGVH3xuun+Dny6hgbWLRWPf1yTIWYyg7jZjFATYtVvhbZbA5+lkNGottoRaznB2gK 5UkLpv1CMo7KZpnf52zGomjw8kiPsnueOGvIvKXdr1qEiljhKqVnPyWMv0x5XVj+hXMm RcdiNY8E7mwmrP782DS2V4gvolkcUBdtC5uMwEWQ4tmgkoHaENrxqOF+f5Qrpmoewvsl rXD38VY4RgI1fzGybO3zvQUNDSJ7Jl+w2qSN/Lh5Qz4C6mgtN2bMeNFXOZZvSst8DXFb N80YKR/FgbJGrx3tyuIYK/o/Qt3WOklODMc77BcFovb+/gUM/ZLefBMS7IqHJZ0XvXUD Ugcg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOSjfw0m4uruXlh4Gg94mBBqhqR" Received: from nimes.localnet by smtp.strato.de (RZmta 48.6.2 AUTH) with ESMTPSA id I8f358z0FAAnHZr (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 15 Jan 2023 11:10:49 +0100 (CET) From: Bruno Haible To: Po Lu Cc: bug-gnulib@gnu.org Subject: Re: fpending Android bug Date: Sun, 15 Jan 2023 11:10:49 +0100 Message-ID: <5411576.7OPFtVAQ6q@nimes> In-Reply-To: <87sfgcbpza.fsf@yahoo.com> References: <87wn5pb3dv.fsf.ref@yahoo.com> <3831502.h0BymrIErR@nimes> <87sfgcbpza.fsf@yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=81.169.146.163; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Po Lu wrote: > It doesn't compile because ->_p and ->_base are undefined in FILE *. > ... > I'm using the NDK r25b; however, bits/struct_file.h in the NDK r25b only > includes: >=20 > __BEGIN_DECLS >=20 > /** The opaque structure implementing `FILE`. Do not make any assumptions= about its content. */ > struct __sFILE { > #if defined(__LP64__) > char __private[152]; > #else > char __private[84]; > #endif > } __attribute__((aligned(sizeof(void*)))); >=20 > __END_DECLS >=20 > even when __ANDROID_API__ is 19. Ah, now that makes sense: When they moved 'struct __sFILE' out of into , they also removed its named fields. In other words, looking at the timeline of the Android API level 19 support: - They added this support in NDK r10e, - In NDK r13b the elements of a FILE were accessible, - In NDK r14b the elements of a FILE were suddenly not accessible any mor= e. I'm applying your patch: 2023-01-15 Bruno Haible fpending: Fix compilation error with NDK =E2=89=A5 r14b and Android API < = 23. Report and patch by Po Lu . * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro. diff --git a/lib/fpending.c b/lib/fpending.c index afa840b851..e57155e586 100644 =2D-- a/lib/fpending.c +++ b/lib/fpending.c @@ -41,7 +41,7 @@ __fpending (FILE *fp) return fp->_IO_write_ptr - fp->_IO_write_base; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix= 3, Android */ =2D return fp->_p - fp->_bf._base; + return fp_->_p - fp_->_bf._base; #elif defined __EMX__ /* emx+gcc */ return fp->_ptr - fp->_buffer; #elif defined __minix /* Minix */