[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Including <locale.h> unconditionally in Emacs
From: |
Paul Eggert |
Subject: |
Including <locale.h> unconditionally in Emacs |
Date: |
Wed, 5 Jun 2024 13:18:42 -0700 |
User-agent: |
Mozilla Thunderbird |
<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
- Including <locale.h> unconditionally in Emacs,
Paul Eggert <=
Re: Including <locale.h> unconditionally in Emacs, Richard Stallman, 2024/06/07