From 3307df444410797b97f5026424a7e6cec18de07c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 30 Jun 2024 00:20:42 +0100 Subject: [PATCH] Do not worry about whether locale.h is includable * src/emacs.c, src/lread.c, src/sysdep.c: Remove preconditions from including locale.h. It was standardized in C89, is universal now, and some code already assumes it. (cherry picked from commit d2b847d2911218380d1640dea81d6e72d4a7dc7c) --- src/emacs.c | 5 +---- src/lread.c | 6 +----- src/sysdep.c | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 74a46468933..56de9d8ba20 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include @@ -132,10 +133,6 @@ extern char etext; # endif #endif -#ifdef HAVE_SETLOCALE -#include -#endif - #if HAVE_WCHAR_H # include #endif diff --git a/src/lread.c b/src/lread.c index 1bc5b0c993d..047a201eaaa 100644 --- a/src/lread.c +++ b/src/lread.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include #include "lisp.h" @@ -55,11 +56,6 @@ along with GNU Emacs. If not, see . */ #endif #include - -#ifdef HAVE_SETLOCALE -#include -#endif /* HAVE_SETLOCALE */ - #include #if !defined HAVE_ANDROID || defined ANDROID_STUBIFY \ diff --git a/src/sysdep.c b/src/sysdep.c index 07237885cb9..9e4f3b211bb 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -4551,9 +4551,7 @@ does the same thing as `current-time'. */) # include # include -# if defined HAVE_NEWLOCALE || defined HAVE_SETLOCALE -# include -# endif +# include # ifndef LC_COLLATE # define LC_COLLATE 0 # endif -- 2.39.2