Suggested by Collin Funk.
* modules/nstrftime-limited: New file, based on modules/nstrftime.
* modules/nstrftime (Depends-on): Add nstrftime-limited.
Add localename-unsafe. Remove localename-unsafe-limited.
(configure.ac): Invoke gl_MODULE_INDICATOR.
(Makefile.am): Don't add nstrftime.c to lib_SOURCES; this would conflict
with modules/nstrftime-limited.
(Link): Add $(LIBTHREAD).
* lib/strftime.c (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME): Don't force
to false if GNULIB_NSTRFTIME is defined.
* modules/nstrftime-tests (Makefile.am): Link test-nstrftime,
test-nstrftime-?? with $(LIBTHREAD).
+2025-07-29 Bruno Haible <bruno@clisp.org>
+
+ nstrftime: Handle non-Gregorian calendars the same way on all platforms.
+ Suggested by Collin Funk.
+ * modules/nstrftime-limited: New file, based on modules/nstrftime.
+ * modules/nstrftime (Depends-on): Add nstrftime-limited.
+ Add localename-unsafe. Remove localename-unsafe-limited.
+ (configure.ac): Invoke gl_MODULE_INDICATOR.
+ (Makefile.am): Don't add nstrftime.c to lib_SOURCES; this would conflict
+ with modules/nstrftime-limited.
+ (Link): Add $(LIBTHREAD).
+ * lib/strftime.c (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME): Don't force
+ to false if GNULIB_NSTRFTIME is defined.
+ * modules/nstrftime-tests (Makefile.am): Link test-nstrftime,
+ test-nstrftime-?? with $(LIBTHREAD).
+
2025-07-29 Bruno Haible <bruno@clisp.org>
git-merge-changelog: Fix upstream/downstream heuristic for "git pull".
# define SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME true
#endif
#if defined _LIBC || (HAVE_ONLY_C_LOCALE || USE_C_LOCALE) \
- || (defined __OpenBSD__ || defined _AIX || defined __ANDROID__)
+ || ((defined __OpenBSD__ || defined _AIX || defined __ANDROID__) \
+ && !GNULIB_NSTRFTIME)
# undef SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME
# define SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME false
#endif
m4/tm_gmtoff.m4
Depends-on:
+nstrftime-limited
attribute
c-ctype
c99
intprops
libc-config
localcharset
-localename-unsafe-limited
+localename-unsafe
bool
stdckdint-h
time_rz
configure.ac:
gl_FUNC_GNU_STRFTIME
+gl_MODULE_INDICATOR([nstrftime])
Makefile.am:
-lib_SOURCES += nstrftime.c
Include:
"strftime.h"
Link:
@INTL_MACOSX_LIBS@
+$(LIBTHREAD)
License:
LGPL
--- /dev/null
+Description:
+nstrftime() function: convert date and time to string, with GNU extensions.
+Supports non-Gregorian calendars on a limited set of platforms:
+all except OpenBSD, AIX, Android.
+
+Files:
+lib/strftime.h
+lib/nstrftime.c
+lib/strftime.c
+lib/calendars.h
+lib/calendar-thai.h
+lib/calendar-persian.h
+lib/calendar-ethiopian.h
+m4/nstrftime.m4
+m4/tm_gmtoff.m4
+
+Depends-on:
+attribute
+c-ctype
+c99
+errno-h
+extensions
+intprops
+libc-config
+localcharset
+localename-unsafe-limited
+bool
+stdckdint-h
+time_rz
+
+configure.ac:
+gl_FUNC_GNU_STRFTIME
+
+Makefile.am:
+lib_SOURCES += nstrftime.c
+
+Include:
+"strftime.h"
+
+Link:
+@INTL_MACOSX_LIBS@
+
+License:
+LGPL
+
+Maintainer:
+Jim Meyering, glibc
test-nstrftime-TH \
test-nstrftime-IR \
test-nstrftime-ET
-test_nstrftime_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@
-test_nstrftime_DE_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@
-test_nstrftime_TH_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@
-test_nstrftime_IR_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@
-test_nstrftime_ET_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@
+test_nstrftime_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_nstrftime_DE_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_nstrftime_TH_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_nstrftime_IR_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_nstrftime_ET_LDADD = $(LDADD) $(SETLOCALE_LIB) @INTL_MACOSX_LIBS@ $(LIBTHREAD)