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__)
+ /* Linux without glibc, Android >= 3.2, Cygwin */
...
This doesn't work as __linux__ is also defined under Android, alas...
OK, but then I'm puzzled by the "(defined __linux__ || defined
__ANDROID__)" in both the original code and in the change you made to
Emacs's copy:
-# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__)
+# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \
+ && (!defined __ANDROID__ || __ANDROID_API__ >= 13)
If __ANDROID__ implies __linux__ there is no need for the "|| defined
__ANDROID__". Wouldn't the following be simpler?
# if (!defined LDAV_DONE && defined __linux__
&& ! (defined __ANDROID__ && __ANDROID_API__ < 12))
More generally, I see several instances of "defined __linux__ || defined
__ANDROID__" in Gnulib; can these be simplified to "defined __linux__"?