From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.emacs.devel Subject: Re: Android port Date: Sun, 06 Aug 2023 12:33:32 +0200 Message-ID: <11660747.27k8W16iEi@nimes> References: <1428589171.162865.1691134964773@mail1.libero.it> <83h6pcrbe9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: angelo.g0@libero.it, emacs-devel@gnu.org To: Eli Zaretskii , Po Lu , Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 06 12:34:43 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 1qSb5v-0007yE-90 for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Aug 2023 12:34:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSb5A-00020w-NB; Sun, 06 Aug 2023 06:33:56 -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 1qSb57-00020g-Nl for emacs-devel@gnu.org; Sun, 06 Aug 2023 06:33:53 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSb55-00044z-DC; Sun, 06 Aug 2023 06:33:53 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1691318012; cv=none; d=strato.com; s=strato-dkim-0002; b=WWTsNwPIApGNXOWbTNgxJsq2Et0JzNLwPcSO8wXDb+hhaP7FKGcb2OzCQIw+6XvSxI blS7l+sWPwil0L3S73dD/9CCBKlqHr4aEdOR7oQvp/fPslyyV0BbtPKGKKrosYaGCyuv VeOERgN4f5plFiQ+CLTuaAU66dqBv4jVAI1SdZZ5v49P3AIYLuuGKvnB70i/RXmikYFm X1tlJO5hcH3F3d1kwA0LYF3mHJVuldEcLxkk3Ophf8lp0x29W8sWyhT+P9Uz1L0lCeyu CEOQrWARyeeQjFHJGL6fnFeJLdvvZJ6H6+/0dV054S+wEwF97cwIYHEMn90pCl5DgebX deRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1691318012; 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=reAsOiJ+4R8h4CtaI6T8eT+RwkU6Bzq2Rbo2WIzO9/8=; b=AaBkiJ9Hqk/K5XLW5Cmg/Y9gw37vVLR1stfnP3QoNEcQDLQN6FAC6ZbYuaVK++S2Be ekRmnuJePTFQQ6a0WaXn1mvtuQXauEb6jNoF76f7CDQv+/JAWxhEu6+vj5aCJdbattmG jZjHb+O3Pq6jSTU+vtvq+/KP7ycjFpNOZif2oho3zizZh6dtK8iBKrePAEJ9+OyX3dae 7BqVIWG54qBqctNUvSN5Hjc5KU8iWB6Usds3mi/k6CNhlJnq5fu8BPBq896tatEpPwXz hYDVZLCEunZAPJa4IRofCmgfJOAJL6QL1qByhdtM+cH2V2BgkQYNadSqzWJVLmBESRHh xg0A== 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=1691318012; 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=reAsOiJ+4R8h4CtaI6T8eT+RwkU6Bzq2Rbo2WIzO9/8=; b=mhwGnX9H1xBLGFvdYUwRPlaYyxLG3ZMuemHTAdua2xTTPlOa1DQXlyGsYSC1/SaV8M bqynqqtVU4KY4n7XSjetwFMONKvnWhsuch+UbRxLvoCixZUAOODQRYFQHZddbeuoaknm KohRwcxUuLhjDxQ3/WydthmzKeprW93h6KyjTL1ba+zehb171xwP3b5AoCxADUALaWmq Y0oQ5ayVHT+xDC5qA9rI48OdKR4ANiBw4F8P+xPqlEk3W+PJ5ounHd9P/tXP4iQ2nj7e yURzLMhSY59fu1xemTTgt2BW+3YxtbJ/FXnZVf+seAtidxOv2IDsSRAxYC0vXN5r6/PI r7bg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1691318012; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=reAsOiJ+4R8h4CtaI6T8eT+RwkU6Bzq2Rbo2WIzO9/8=; b=EzCJTdvAx927RcenE6NKDOa71UcedGft/469+tVudp2Vf1wIrbvBdIrp08mAh2ksl6 zQOi94q6PHFQtzYM7IDQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOTiPMPWro5IJ+rUD0ISbPnXXI/" Original-Received: from nimes.localnet by smtp.strato.de (RZmta 49.6.6 AUTH) with ESMTPSA id x129eaz76AXWYfB (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 6 Aug 2023 12:33:32 +0200 (CEST) In-Reply-To: Received-SPF: none client-ip=81.169.146.221; 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_H4=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: 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:308343 Archived-At: Paul Eggert wrote: > As I understand it the Android port uses Gnulib printf-posix and > vasprintf-posix modules only because Android printf lacks support for > "%td", "%jd" and "%ju". No, that's not the case. Android *printf supports the 't', 'j', 'z' already since 2009-03-04 (ca. Android 1.6). I don't know what's the minimum supported Android version targetted by Po Lu is, but for Android 4.3 you find the deficiencies listed in gnulib/m4/printf.m4: dnl . = yes, # = no. dnl dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 dnl Android 4.3 . # . # # # # # # # # ? . # . # . # . . . # . . Legend: dnl 2 = checking whether printf supports size specifiers as in C23... dnl 4 = checking whether printf supports infinite 'double' arguments... dnl 5 = checking whether printf supports infinite 'long double' arguments... dnl 6 = checking whether printf supports the 'a' and 'A' directives... dnl 7 = checking whether printf supports the 'b' directive... dnl 8 = checking whether printf supports the 'B' directive... dnl 9 = checking whether printf supports the 'F' directive... dnl 10 = checking whether printf supports the 'n' directive... dnl 11 = checking whether printf supports the 'ls' directive... dnl 12 = checking whether printf supports the 'lc' directive correctly... dnl 14 = checking whether printf supports the grouping flag... dnl 16 = checking whether printf supports the zero flag correctly... dnl 18 = checking whether printf survives out-of-memory conditions... dnl 22 = checking whether snprintf fully supports the 'n' directive... > If this understanding is correct, how about if > we go through the printf formats in the Emacs C source code, and replace > all uses of "%jd" and "%ju" with "%"PRIdMAX and "%"PRIuMAX, and all uses > of "%td" with "%"pT"d" where pT is an Emacs invention defined like this: > > #ifdef __ANDROID__ > # define pT "z" > #else > # define pT "t" > #endif This workaround is not needed, since the problem is not there, not for Android and not for other platforms either: Gnulib's documentation lists the platforms @item This function does not support size specifiers as in C99 (@code{hh}, @code{ll}, @code{j}, @code{t}, @code{z}) on some platforms: AIX 5.1, HP-UX 11.23, IRIX 6.5, Solaris 9, Cygwin 1.5.24, mingw, MSVC 14. AIX 5.1, HP-UX 11.23, IRIX 6.5, Solaris 9, Cygwin 1.5.24 are long obsolete, mingw is dealt with by Emacs differently, and MSVC is not supported by Emacs (AFAIU). Bruno