mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 10:53:23 +00:00
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:
parent
d2b847d291
commit
69374fbe82
4 changed files with 8 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue