+2024-02-07 Bruno Haible <bruno@clisp.org>
+
+ nstrftime: Work around strftime bug with %r on macOS and FreeBSD.
+ * lib/strftime.c (__strftime_internal): For %r, don't use the underlying
+ strftime() directly.
+ * doc/posix-functions/strftime.texi: Mention the %r bug.
+
2024-02-07 Paul Eggert <eggert@cs.ucla.edu>
Assume ‘long long’ support
Portability problems not fixed by Gnulib:
@itemize
@item
+The %r specifier produces empty output, at least in a French locale,
+on some platforms:
+macOS 12.5, FreeBSD 14.0.
+@item
The Windows C runtime library (which is used by MinGW) does not
support the %e specifier (and possibly the other more recent SUS
specifiers too, i.e., %C, %D, %h, %n, %r, %R, %t, and %T).
== L_('\0'))
subfmt = L_("%I:%M:%S %p");
goto subformat;
+#elif (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__
+ /* macOS, FreeBSD strftime() may produce empty output for "%r". */
+ subfmt = L_("%I:%M:%S %p");
+ goto subformat;
#else
goto underlying_strftime;
#endif