AC_CHECK_FUNCS([accept4 fchdir gethostname \
getrusage get_current_dir_name \
lrand48 random rint tcdrain trunc \
-select getpagesize setlocale newlocale \
+select getpagesize newlocale \
getrlimit setrlimit shutdown \
pthread_sigmask strsignal setitimer \
sendto recvfrom getsockname getifaddrs freeifaddrs \
/* True if handling a fatal error already. */
bool fatal_error_in_progress;
-#if !HAVE_SETLOCALE
-static char *
-setlocale (int cat, char const *locale)
-{
- return 0;
-}
-#endif
-
/* True if the current system locale uses UTF-8 encoding. */
static bool
using_utf8 (void)
#endif
\f
-#if HAVE_SETLOCALE
/* Recover from setlocale (LC_ALL, ""). */
void
fixup_locale (void)
*plocale = desired_locale;
char const *locale_string
= STRINGP (desired_locale) ? SSDATA (desired_locale) : "";
-# ifdef WINDOWSNT
+#ifdef WINDOWSNT
/* Changing categories like LC_TIME usually requires specifying
an encoding suitable for the new locale, but MS-Windows's
'setlocale' will only switch the encoding when LC_ALL is
numbers is unaffected. */
setlocale (LC_ALL, locale_string);
fixup_locale ();
-# else /* !WINDOWSNT */
+#else
setlocale (category, locale_string);
-# endif /* !WINDOWSNT */
+#endif
}
}
Vsystem_time_locale);
}
-# ifdef LC_MESSAGES
+#ifdef LC_MESSAGES
static Lisp_Object Vprevious_system_messages_locale;
-# endif
+#endif
/* Set system messages locale to match Vsystem_messages_locale, if
possible. */
void
synchronize_system_messages_locale (void)
{
-# ifdef LC_MESSAGES
+#ifdef LC_MESSAGES
synchronize_locale (LC_MESSAGES, &Vprevious_system_messages_locale,
Vsystem_messages_locale);
-# endif
+#endif
}
-#endif /* HAVE_SETLOCALE */
/* Return a diagnostic string for ERROR_NUMBER, in the wording
and encoding appropriate for the current locale. */
#ifdef WINDOWSNT
extern Lisp_Object Vlibrary_cache;
#endif
-#if HAVE_SETLOCALE
void fixup_locale (void);
void synchronize_system_messages_locale (void);
void synchronize_system_time_locale (void);
-#else
-INLINE void fixup_locale (void) {}
-INLINE void synchronize_system_messages_locale (void) {}
-INLINE void synchronize_system_time_locale (void) {}
-#endif
extern char *emacs_strerror (int) ATTRIBUTE_RETURNS_NONNULL;
extern void shut_down_emacs (int, Lisp_Object);