Bruno Haible <br...@clisp.org> writes:

>  B) Always use the C locale. This is suitable because the C locale is the
>     only one supported on Android. (See bionic/libc/tzcode/strftime.c .)

[...]

> I went for approach B, because it is the simplest one.
>
>
> 2025-05-08  Bruno Haible  <br...@clisp.org>
>
>       nstrftime: Fix a link error on Android API level ≥ 35.
>       Reported by Po Lu <luang...@yahoo.com> in
>       <https://lists.gnu.org/archive/html/bug-gnulib/2025-05/msg00069.html>.
>       * lib/strftime.c (HAVE_ONLY_C_LOCALE): New macro.
>       (REQUIRE_GNUISH_STRFTIME_AM_PM): Set to false if HAVE_ONLY_C_LOCALE
>       is 1.
>       (TOUPPER): Use c_toupper if HAVE_ONLY_C_LOCALE is 1.
>       (c_locale_cache, c_locale): Don't define if HAVE_ONLY_C_LOCALE
>       && HAVE_STRUCT_TM_TM_ZONE.
>       (utc_timezone_cache, utc_timezone): Don't define if
>       (HAVE_ONLY_C_LOCALE || (USE_C_LOCALE && !HAVE_STRFTIME_L))
>       && HAVE_STRUCT_TM_TM_ZONE.
>       (c_weekday_names, c_month_names): Define also if HAVE_ONLY_C_LOCALE
>       is 1.
>       (underlying_strftime): Don't define if
>       HAVE_ONLY_C_LOCALE && HAVE_STRUCT_TM_TM_ZONE
>       && !(USE_C_LOCALE && !HAVE_STRFTIME_L).
>       (get_tm_zone): On Android, don't return NULL.
>       (__strftime_internal): If HAVE_ONLY_C_LOCALE is 1, don't invoke
>       underlying_strftime.
>       * modules/nstrftime (Depends-on): Add c-ctype.

This appears reasonable--thank you.  It appears that I will be unable to
merge this update into Emacs for several days yet as my attention is
currently concentrated elsewhere, but if anyone does it will be
automatically tested within 24 hours.

Reply via email to