From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Android port Date: Sun, 6 Aug 2023 09:21:03 -0700 Organization: UCLA Computer Science Department Message-ID: <3d1e632f-0e90-431f-5695-f124b2901860@cs.ucla.edu> References: <1428589171.162865.1691134964773@mail1.libero.it> <87v8ds5xr4.fsf@yahoo.com> <838raoqzro.fsf@gnu.org> <5235398.eMNxiy0SpO@nimes> <87edkgbfa8.fsf@ledu-giraud.fr> <87sf8w49sc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------TlSZY3HQY0FX09Wu9ulO0esB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Bruno Haible , Eli Zaretskii , angelo.g0@libero.it, emacs-devel@gnu.org, Manuel Giraud To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 06 18:21:55 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qSgVu-0007iV-FG for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Aug 2023 18:21:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSgVE-0006gv-W7; Sun, 06 Aug 2023 12:21:13 -0400 Original-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 1qSgVD-0006gl-G9 for emacs-devel@gnu.org; Sun, 06 Aug 2023 12:21:11 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSgV8-0007yJ-PI; Sun, 06 Aug 2023 12:21:11 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 584F53C011BD6; Sun, 6 Aug 2023 09:21:04 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FV3KPKRwriqv; Sun, 6 Aug 2023 09:21:04 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 007583C011BD8; Sun, 6 Aug 2023 09:21:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 007583C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691338864; bh=Uyz2liEYfHNCWOHVYmtXSCIFvjn5TwS/02zKKRFRg4k=; h=Message-ID:Date:MIME-Version:To:From; b=XO+Tcl6YkiwfY5FhsakepTnjbkXV6GoOEYYIZc9U2gukqtcdGAHij3TNI6UBTyNZP N9VltChC8ZzOazKPc1crVNIa9YvUnpvPsJsQkC6acDA0RlvcqMnLgiaKKLHjbbGbZF GXL/NcTvKcmK3Mxy4U+CH7mZARVCHzwCv5gP5JqjiLlfx+MRLyf3nP2I25EtsUbLj+ PiDjBrsH1jIDsTx/XmTjLsR8Bv9pPE8pRAdfjwFUBu3Y/aEXkE6GizO33qW2gRn1Mk z+YDU7B+PwATgCYJ35SvUKz/dnOY8LIMqh1LJunxFvX+dZzKIetEdl8y6hZ2y7rsHG XG1I7kQOsJbPQ== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GIRBwIMpiCSF; Sun, 6 Aug 2023 09:21:03 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id C1D593C011BD6; Sun, 6 Aug 2023 09:21:03 -0700 (PDT) Content-Language: en-US In-Reply-To: <87sf8w49sc.fsf@yahoo.com> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-4.139, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308378 Archived-At: This is a multi-part message in MIME format. --------------TlSZY3HQY0FX09Wu9ulO0esB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-08-06 05:47, Po Lu wrote: > Now that we can be construed to have read them, we must go out of our > way to make our code dissimilar, should we ever want to perform the same > modification. I have not read those patches. I wrote the attached patch myself and installed it into the master branch, so we don't need to worry about printf %n for Android. Although I don't know whether the attached patch is dissimilar to the OpenBSD patches that I haven't read, it's surely dissimilar emough, as the attached patch uses sprintf (safely) and the OpenBSD folks are allergic to sprintf. --------------TlSZY3HQY0FX09Wu9ulO0esB Content-Type: text/x-patch; charset=UTF-8; name="0001-Stop-using-printf-n.patch" Content-Disposition: attachment; filename="0001-Stop-using-printf-n.patch" Content-Transfer-Encoding: base64 RnJvbSAxY2MyMDUzNWY4NzMwZjQ5Y2Q1ZDAxMjMxM2MxZWFmMDYyN2Q3MjE2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBTdW4sIDYgQXVnIDIwMjMgMDk6MDg6NTYgLTA3MDAKU3ViamVjdDogW1BBVENI XSBTdG9wIHVzaW5nIHByaW50ZiAlbgpNSU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6 IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzog OGJpdAoKKiBzcmMvZW1hY3MuYyAoc2h1dF9kb3duX2VtYWNzKTogRG9u4oCZdCB1c2UgcHJp bnRm4oCZcyAiJW4iIGZvcm1hdC4KQW5kcm9pZCwgTVMtV2luZG93cywgYW5kIE9wZW5CU0Qg ZG9u4oCZdCBzdXBwb3J0IGl0LCBhbmQgaXTigJlzIGVhc3kKZW5vdWdoIHRvIGRvIGl0cyBl cXVpdmFsZW50IGJ5IGhhbmQuCi0tLQogc3JjL2VtYWNzLmMgfCAyMyArKysrKysrKysrKysr KystLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDE1IGluc2VydGlvbnMoKyksIDggZGVsZXRp b25zKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL2VtYWNzLmMgYi9zcmMvZW1hY3MuYwppbmRleCA4 MGEwMTNiNjhkZi4uNWEwMzY1NTRhODcgMTAwNjQ0Ci0tLSBhL3NyYy9lbWFjcy5jCisrKyBi L3NyYy9lbWFjcy5jCkBAIC0yOTU5LDI0ICsyOTU5LDMxIEBAIHNodXRfZG93bl9lbWF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