emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including <locale.h> unconditionally in Emacs


From: Eli Zaretskii
Subject: Re: Including <locale.h> unconditionally in Emacs
Date: Thu, 06 Jun 2024 07:53:46 +0300

> Date: Wed, 5 Jun 2024 13:18:42 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> <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.

I think this is okay as far as modern Posix systems, MS-Windows and
even MS-DOS are concerned, but I'd like to hear from Po Lu wrt the
Andriod port, as I'm not familiar with the situation there.  I think
Po Lu also builds Emacs on some ancient Solaris version, so maybe
there's an issue there?  And what about macOS?

In any case, please don't make this change in Emacs until after the
emacs-30 release branch is cut (which should happen soon).  And if the
Gnulib folks are going to make that change in Gnulib now, it means we
will have one more reason not to import from Gnulib before the branch
point.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]