emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Android port


From: Paul Eggert
Subject: Re: Android port
Date: Sun, 6 Aug 2023 01:48:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 2023-08-05 22:24, Eli Zaretskii wrote:
Paul didn't chime in yet, so I'd like to wait for him to comment on
this.  I see no reason why we would be unable to omit these modules
like we do with others.

I don't either, but I hope we don't have to worry about it.

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". 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

That way, the Android branch wouldn't need to use the printf-posix and vasprintf-posix modules, and we wouldn't have to worry about the hassle of porting them into the Emacs world.

Admittedly this hack is not the Gnulib Way, but Emacs departs so far from the Gnulib Way that this one extra little thing shouldn't be that big of a deal.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]