Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
locale.c: querylocale() doesn't work on LC_ALL
I had misread the man pages. This bug has been in the field for several releases now, but most likely hasn't shown up because it's almost always the case that the locale categories will be set to the same locale. And so most implementations of querylocale() would return the correct result. This commit works by splitting the calculation of the value of LC_ALL from S_emulate_setlocale_i() into a separate function, and extending it to work on querylocale() systems. This has the added benefit of removing tangential code from the main line, making S_emulate_setlocale_i easier to read. calculate_LC_ALL() is the new function, and is now called from two places. As part of this commit, constness is added to PL_curlocales[] Part of this change is to keep our records of LC_ALL on non-querylocale systems always up-to-date, which is better practice And part of this change is temporary, marked as such, to be removed a few commits later.
- Loading branch information
1 parent
53030a6
commit 2638e45
Showing
5 changed files
with
186 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters