* lib/strftime.c: Include locale.h unconditionally, simplifying
the code.  Emacs is now open for this change, which we had wanted
to do earlier.
---
 ChangeLog      | 7 +++++++
 lib/strftime.c | 7 +------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f058aab66a..18f538758b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-27  Paul Eggert  <egg...@cs.ucla.edu>
+
+       nstrftime: always include locale.h
+       * lib/strftime.c: Include locale.h unconditionally, simplifying
+       the code.  Emacs is now open for this change, which we had wanted
+       to do earlier.
+
 2024-06-27  Collin Funk  <collin.fu...@gmail.com>
 
        netdb: Simplify NI_MAXHOST and NI_MAXSERV definitions.
diff --git a/lib/strftime.c b/lib/strftime.c
index e21a356e80..9b1b27a1fc 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -82,17 +82,12 @@
 #endif
 
 #include <limits.h>
+#include <locale.h>
 #include <stdckdint.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
-#if (((defined __NetBSD__ || defined __sun) && REQUIRE_GNUISH_STRFTIME_AM_PM) \
-     || (defined _WIN32 && !defined __CYGWIN__) \
-     || (USE_C_LOCALE && HAVE_STRFTIME_L))
-# include <locale.h>
-#endif
-
 #if (defined __NetBSD__ || defined __sun) && REQUIRE_GNUISH_STRFTIME_AM_PM
 # include "localename.h"
 #elif defined _WIN32 && !defined __CYGWIN__
-- 
2.34.1


Reply via email to