Hash :
66de6c8f
Author :
Date :
2024-06-03T22:00:59
nstrftime: remove dependency on hard-locale GNU Emacs would rather keep dependencies to a minimum, and hard-locale brings in some other stuff. * lib/strftime.c: Include locale.h only if (USE_C_LOCALE && HAVE_STRFTIME_L) || ((defined __NetBSD__ || defined __sun) && REQUIRE_GNUISH_STRFTIME_AM_PM). Do not include hard-locale.h. (libc_hidden_def): On native MS-Windows, use the C locale %c format regardless of language. I hope that’s good enough. If not, let’s try to think of a way of solving the problem that doesn’t require using hard_locale. * modules/nstrftime (Depends-on): Remove hard-locale. * modules/nstrftime-tests (test_nstrftime_LDADD): Remove $(HARD_LOCALE_LIB). * tests/test-nstrftime.h (locales_test): Add a test that I hope works on French MS-Windows.
Files:
tests/test-nstrftime-1.sh
tests/test-nstrftime-2.sh
tests/test-nstrftime.c
tests/test-nstrftime.h
tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
m4/musl.m4
Depends-on:
atoll
c99
intprops
setlocale
strerror
configure.ac:
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gl_MUSL_LIBC
Makefile.am:
TESTS += test-nstrftime-1.sh test-nstrftime-2.sh
TESTS_ENVIRONMENT += \
LOCALE_FR='@LOCALE_FR@' \
LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-nstrftime
test_nstrftime_LDADD = $(LDADD) $(SETLOCALE_LIB)