]> Savannah Git Hosting - gnulib.git/commit
nstrftime: allow opt-out of AM/PM adjustment
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Feb 2024 06:29:27 +0000 (22:29 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Feb 2024 06:29:58 +0000 (22:29 -0800)
commit4cc019608e70adcf1b3b5c9e211b03751c80cb7f
treee3be0f3ef3bace5828a5c194cef451b19dd293fb
parent6afcd476b76c8331b038c6ce878e77375a85d288
nstrftime: allow opt-out of AM/PM adjustment

For Emacs I would rather avoid bringing in the Gnulib locking code,
since Emacs has its own idea about locks and its main engine is
single-threaded anyway.
Provide a way to use the nstrftime module while avoiding its
recently-added localename dependency, which entails locking code.
(It’s not clear to me that the locking code is needed for nstrftime,
as NetBSD has strftime_z and Solaris locales could be inspected in
some thread-safe way, e.g., by probing strftime month names.
Anyway, all that’s more hassle than I want to put up with right now
for the trivial matter of AM/PM behavior.)
* lib/strftime.c (REQUIRE_GNUISH_STRFTIME_AM_PM):
New macro, which can be overridden by config.h.
(should_remove_ampm, __strftime_internal):
Use it instead of !USE_C_LOCALE when deciding to
implement Gnuish AM/PM behavior.
ChangeLog
lib/strftime.c