Re: Android API 8 compilation errors

2025-04-21 Thread Collin Funk
Paul Eggert writes: > +# if (!defined LDAV_DONE \ > + && (defined __ANDROID__ ? 13 <= __ANDROID_API__ : __defined __linux__)) > +/* non-Android Linux without glibc, Android 3.2+, Cygwin > */ Small typo here caused by Haiku build to fail like so: getloadavg.c: In fu

Re: Android API 8 compilation errors

2025-04-21 Thread Paul Eggert
On 2025-04-21 10:19, Bruno Haible wrote: when writing 'defined __linux__' one typically thinks about GNU/Linux and musl-based systems. Android systems are often so different and always require separate testing. OK, thanks for the review. I installed the following patch to Gnulib. It should wor

Re: Android API 8 compilation errors

2025-04-21 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > > This doesn't work as __linux__ is also defined under Android, alas... > > OK, but then I'm puzzled by the "(defined __linux__ || defined __ANDROID__)" Its purpose is to remind the reader that Android is included. Because when writing 'defined __linux__' one typically thinks

Re: Android API 8 compilation errors

2025-04-21 Thread Paul Eggert
On 2025-04-21 05:15, Po Lu wrote: -# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) - /* Linux without glibc, Android, Cygwin */ +# if !defined LDAV_DONE && (defined __linux__ || 13 <= __ANDROID_API__) + /*

Re: Android API 8 compilation errors

2025-04-21 Thread Po Lu
Bruno Haible writes: > Po Lu wrote: >> >> these Reddit threads, where multiple respondents are either considering >> >> or have acquired this device or its successor: >> >> >> >> >> >> https://old.reddit.com/r/ereader/comments/1esc5gx/tolino_shine_1_gen_in_2024/ >> >> (Android 2.3) >> > >>

Re: Android API 8 compilation errors

2025-04-21 Thread Bruno Haible via Gnulib discussion list
Po Lu wrote: > >> these Reddit threads, where multiple respondents are either considering > >> or have acquired this device or its successor: > >> > >> > >> https://old.reddit.com/r/ereader/comments/1esc5gx/tolino_shine_1_gen_in_2024/ > >> (Android 2.3) > > > > These seem to be isolated offer

Re: Android API 8 compilation errors

2025-04-21 Thread Po Lu
Bruno Haible writes: > Po Lu wrote: >> these Reddit threads, where multiple respondents are either considering >> or have acquired this device or its successor: >> >> >> https://old.reddit.com/r/ereader/comments/1esc5gx/tolino_shine_1_gen_in_2024/ >> (Android 2.3) > > These seem to be isola

Re: Android API 8 compilation errors

2025-04-21 Thread Bruno Haible via Gnulib discussion list
Po Lu wrote: > these Reddit threads, where multiple respondents are either considering > or have acquired this device or its successor: > > > https://old.reddit.com/r/ereader/comments/1esc5gx/tolino_shine_1_gen_in_2024/ > (Android 2.3) These seem to be isolated offers. Not something with a s

Re: Android API 8 compilation errors

2025-04-21 Thread Po Lu
Paul Eggert writes: > I think it unlikely, but if we run into any we can complicate Gnulib > later. Could you please review and try the attached patch? Thanks. > > diff --git a/lib/getloadavg.c b/lib/getloadavg.c > index 9da41c16c0..4e0f6d81b3 100644 > --- a/lib/getloadavg.c > +++ b/lib/getloadav

Re: Android API 8 compilation errors

2025-04-21 Thread Po Lu
Bruno Haible writes: > 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 sm

Re: Android API 8 compilation errors

2025-04-21 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > > Probably. I don't know whether any non-Android systems exist where > > __ANDROID_API__ is defined. > > I think it unlikely Yes, very unlikely. > Could you please review and try the attached patch? Thanks. The patch looks good to me, except that we need to hear from Po Lu

Re: Android API 8 compilation errors

2025-04-21 Thread Bruno Haible via Gnulib discussion list
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

Re: Android API 8 compilation errors

2025-04-21 Thread Paul Eggert
On 2025-04-20 21:54, Po Lu wrote: Probably. I don't know whether any non-Android systems exist where __ANDROID_API__ is defined. I think it unlikely, but if we run into any we can complicate Gnulib later. Could you please review and try the attached patch? Thanks. diff --git a/lib/getloadav

Re: Android API 8 compilation errors

2025-04-20 Thread Po Lu
Paul Eggert writes: > On 2025-04-20 18:45, Po Lu wrote: > >> -# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) >> +# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \ >> + && (!defined __ANDROID__ || __ANDROID_API__ >= 13) > > Wouldn't the following b

Re: Android API 8 compilation errors

2025-04-20 Thread Paul Eggert
On 2025-04-20 18:45, Po Lu wrote: -# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) +# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \ + && (!defined __ANDROID__ || __ANDROID_API__ >= 13) Wouldn't the following be simpler, and work as well? #if

Re: Android API 8 compilation errors

2025-04-20 Thread Po Lu
Po Lu writes: > Bruno Haible writes: > >> Po Lu wrote: >>> The latest Gnulib getloadavg.c does not compile on Android API 8, with >>> the NDK r10c: >>> >>> CC getloadavg.o >>> getloadavg.c: In function 'rpl_getloadavg': >>> getloadavg.c:509:5: error: implicit declaration of function 'sy

Re: Android API 8 compilation errors

2025-04-20 Thread Po Lu
Bruno Haible writes: > Po Lu wrote: >> The latest Gnulib getloadavg.c does not compile on Android API 8, with >> the NDK r10c: >> >> CC getloadavg.o >> getloadavg.c: In function 'rpl_getloadavg': >> getloadavg.c:509:5: error: implicit declaration of function 'sysinfo' >> [-Werror=implic

Re: Android API 8 compilation errors

2025-04-20 Thread Bruno Haible via Gnulib discussion list
Po Lu wrote: > The latest Gnulib getloadavg.c does not compile on Android API 8, with > the NDK r10c: > > CC getloadavg.o > getloadavg.c: In function 'rpl_getloadavg': > getloadavg.c:509:5: error: implicit declaration of function 'sysinfo' > [-Werror=implicit-function-declaration] >