On 6/30/24 13:18, Po Lu wrote:
How many lines remain of my 15-line quota of contributions to Gnulib?
I wouldn't worry about the quota; we can solve that problem later as
need be.
#if defined __ANDROID_API__ && (__ANDROID_API__ < 21)
you lose
#endif /* defined __ANDROID_API__ && (__ANDROID_API__ < 21) */
Autoconf's existing AC_FUNC_STRNLEN uses AC_RUN_IFELSE so this wouldn't
work as-is.
Perhaps you could write up a patch against Autoconf? That wouldn't count
against the Gnulib quota....
and, when not cross-compiling,
verify (strnlen ("", SIZE_MAX) == 0);
This won't work in general, as GCC will optimize away the call to
strnlen and presumably other compilers will do the same.