Po Lu wrote: > >> Looking at https://apilevels.com/, especially the column "Cumulative > >> usage", > >> it seems there are no users of Android API level 13 or older any more. > > > > My experience differs
My experience agrees with https://apilevels.com/ : Most smartphones built around 2011-2012 had a life span of 3-8 years. That is, their hardware broke before 2020 (either the battery, or the plastic cable, or something else). > > --many E-Book readers are shipped with API 8 or 9, Do you mean: were shipped, or are still shipped today? > I should advise you now that the breadth of Android systems supported by > Emacs is non-negotiable as a matter of principle for myself Whereas on my side, what is non-negotiable is a reasonable approach to the set of supported platforms. Gnulib does not support Fedora 1 or OpenBSD 3.8 or Solaris 9 or similar systems, because there are too few users still running such old operating systems. And that is on PCs, which have a life span of up to 15 years and a replacement cost of € 500. Whereas for Android devices, the number of users on a given OS version diminishes more rapidly, because the life span is around 3-8 years and the replacement cost is around € 100. However, I'm willing to accept patches, according to the "patches thoughtfully considered" principle: If you (or Paul) provide patches that restore Android 8 support without breaking builds with newer API levels, they will be thoughtfully considered. > I suggest that you cooperate > by installing the very trivial patch now in "admin/gnulib-patches/lib", > to wit: > > diff --git a/lib/getloadavg.c b/lib/getloadavg.c > index 9da41c16c02..1cb1c01097d 100644 > --- a/lib/getloadavg.c > +++ b/lib/getloadavg.c > @@ -499,7 +499,8 @@ getloadavg (double loadavg[], int nelem) > } > # endif > > -# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) > +# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \ > + && (!defined __ANDROID__ || __ANDROID_API__ >= 13) > /* Linux without glibc, Android, > Cygwin */ > # define LDAV_DONE > # undef LOAD_AVE_TYPE This patch has five problems: 1. I thought you were building one Emacs binary per version, only, namely with Android API level 8. If you eliminate the use of sysinfo() at compile time like this, it means that load average detection will not work (i.e. produce 0,0,0) even on the newest Android version, in your Emacs binaries. Is that what you intend? Or will you produce, say, two binaries, one built with Android API level 8, and one with a newer one, say, Android API level 24? The latter would then be able to have working load average detection, while the former wouldn't. 2. The line after '# if' is not correctly indented. 3. The preprocessor expression ought to be simplified. 4. The comment a line later is not updated. 5. The patch lacks a ChangeLog entry or commit message. Whether you fix problem #1, is your choice. But if you want a patch included in Gnulib, it needs to fix problems 2, 3, 4, 5. And, please, send patches at attachment, not inline in the mail. Some mail user agents mangle whitespace in a way that inline patches are not applicable. Bruno