unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Including <locale.h> unconditionally in Emacs
@ 2024-06-05 20:18 Paul Eggert
  2024-06-06  4:53 ` Eli Zaretskii
  2024-06-08  2:54 ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: Paul Eggert @ 2024-06-05 20:18 UTC (permalink / raw)
  To: Emacs Development

<locale.h> was standardized in C89, and all C platforms in current use 
have it, if only to supply a dummy implementation with only a C locale. 
However, the Emacs C source code currently attempts to port to platforms 
lacking <locale.h> with code like this (though details vary):

  #ifdef HAVE_SETLOCALE
  # include <locale.h>
  #endif

This sort of code dates back to the 1990s when some older platforms 
predating C89 support presumably lacked <locale.h> and setlocale.

As Emacs surely long ago stopped porting to platforms so obsolete that 
they lack <locale.h>, I assume it would be OK for Emacs to start 
including <locale.h> unconditionally. I thought I'd ask here first, 
though, just to make sure.

This topic came up on the Gnulib mailing list, since Emacs uses Gnulib 
modules that currently have code to work around the absence of 
<locale.h>, code that is a bit of a hassle and that we'd rather stop 
maintaining and that is present only because Emacs uses those modules. 
You can see the Gnulib thread here:

https://lists.gnu.org/r/bug-gnulib/2024-06/msg00057.html



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-23 12:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 20:18 Including <locale.h> unconditionally in Emacs Paul Eggert
2024-06-06  4:53 ` Eli Zaretskii
2024-06-06  5:44   ` Paul Eggert
2024-06-06  5:57     ` Eli Zaretskii
2024-06-06  6:46       ` Po Lu
2024-06-06  7:02         ` Stefan Kangas
2024-06-23 12:32     ` Stefan Kangas
2024-06-23 12:38       ` Eli Zaretskii
2024-06-08  2:54 ` Richard Stallman
2024-06-08  6:46   ` Eli Zaretskii
2024-06-11 15:01     ` Richard Stallman
2024-06-23  9:16     ` Björn Bidar

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).