From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Android port Date: Sat, 05 Aug 2023 15:42:10 +0300 Message-ID: <83fs4xslst.fsf@gnu.org> References: <1428589171.162865.1691134964773@mail1.libero.it> <4484333.4B0zn089NQ@nimes> <83msz5sn66.fsf@gnu.org> <3473524.ldcX8TXnAK@nimes> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12470"; mail-complaints-to="usenet@ciao.gmane.io" Cc: angelo.g0@libero.it, luangruo@yahoo.com, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Bruno Haible Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 05 14:42:54 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 1qSGcQ-00034p-6z for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Aug 2023 14:42:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSGbu-0003Fm-0a; Sat, 05 Aug 2023 08:42:22 -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 1qSGbd-0003Bf-FG for emacs-devel@gnu.org; Sat, 05 Aug 2023 08:42:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSGbZ-0003nU-Ar; Sat, 05 Aug 2023 08:42:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vJg7mJ5MIGneMSH6faxQBSCzDNlt9uT0F2vPehWZN64=; b=GK8Hvz1eG6gG l8YJU0T/gjFC44cZfu9nFwawF6ZpUsQ6Wm5b+O6jWw40klTLeRADqbi6pc1C7QgPLiULaAwpQAz+y 70czg+iHGlx74K4TKjBGLNr3MJyiin/GG2i6LhyWUfQxqPnBy+KLIjrZA5hnTELiCxNucofgOyzu9 S5rCyepyxClPV0jVdI6DHMvB+YQ0LZ2DtAYz/kPEINwVN3TzGqJMT1z3V8CkTqRr9xEDE4WlVtglt uw2IWmxfsoDy/ObflVZfloEc05WforPIlzhXuFvlAxftM7n4/xHNSgzhErZsVAsprX8U5F3P1CHvB dlFd6WYPGsKX3KOv2EdZ9A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSGbU-0007ls-GL; Sat, 05 Aug 2023 08:41:59 -0400 In-Reply-To: <3473524.ldcX8TXnAK@nimes> (message from Bruno Haible on Sat, 05 Aug 2023 14:25:59 +0200) 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:308318 Archived-At: > From: Bruno Haible > Cc: angelo.g0@libero.it, luangruo@yahoo.com, eggert@cs.ucla.edu, emacs-devel@gnu.org > Date: Sat, 05 Aug 2023 14:25:59 +0200 > > Eli Zaretskii wrote: > > The MinGW build omits building the Gnulib's stdio module. We did that > > since 2017. The exact reasons are probably lost in time, but I can > > assure you they were real, and I wouldn't want to reintroduce them for > > this particular reason. > > It'd be worth a try nevertheless. Gnulib has changed a lot since 2017. If someone wants to try that and report back, I won't mind. But I personally don't have time (nor the motivation, TBH). There be dragons: for example, Emacs on MS-Windows provides its own implementation of fopen, because we want to support UTF-8 encoded file names even when the system codepage is not (or cannot be) UTF-8. Likewise with any other Gnulib replacement that accepts file names: Emacs must be able to pass UTF-8 encoded file names on Windows, because it supports non-ASCII file names without restrictions imposed by the current system codepage. > So, if you decided not to have a generated stdio.h, the simplest > solution seems to be: > 1) in the conf_post.h or nt/inc/ms-w32.h, include > (this is the one from the system), > 2) after this #include, add > #define asprintf rpl_asprintf > #define printf __printf__ > #define vasprintf rpl_vasprintf > #define vfprintf rpl_vfprintf > and add prototypes for these 4 functions. I'd prefer to use the simpler machinery of OMIT_GNULIB_MODULE to prevent the Emacs build from compiling asprintf.c and similar replacements on MS-Windows. Is that possible? We do that with several other Gnulib modules, see the file nt/gnulib-cfg.mk in the Emacs repository. Thanks.