Assume setlocale exists

Like locale.h, it was standardized by C89, is universally
available now, and some code already assumes it.
* configure.ac: Do not check for setlocale.
* src/emacs.c (setlocale) [!HAVE_SETLOCALE]: Remove.
(fixup_locale, synchronize_locale, Vprevious_system_time_locale)
(synchronize_system_time_locale): Define even if !HAVE_SETLOCALE.
* src/sysdep.c (emacs_setlocale): Simplify by assuming HAVE_SETLOCALE.
This commit is contained in:
Paul Eggert 2024-06-30 00:36:34 +01:00
parent d2b847d291
commit 69374fbe82
4 changed files with 8 additions and 28 deletions

View file

@ -4593,15 +4593,11 @@ freelocale (locale_t loc)
static char *
emacs_setlocale (int category, char const *locale)
{
# ifdef HAVE_SETLOCALE
errno = 0;
char *loc = setlocale (category, locale);
if (loc || errno)
return loc;
errno = EINVAL;
# else
errno = ENOTSUP;
# endif
return 0;
}