Page MenuHomeFreeBSD

libc: use separate collate objects for C, POSIX, and C.UTF-8
ClosedPublic

Authored by yuripv on May 6 2021, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 9:12 PM
Unknown Object (File)
Thu, Mar 21, 10:02 PM
Unknown Object (File)
Dec 23 2023, 12:53 AM
Unknown Object (File)
Dec 13 2023, 8:06 AM
Unknown Object (File)
Nov 12 2023, 12:35 AM
Unknown Object (File)
Oct 28 2023, 3:25 PM
Unknown Object (File)
Oct 10 2023, 11:31 PM
Unknown Object (File)
Sep 20 2023, 1:26 PM
Subscribers

Details

Summary

This fixes newlocale overwriting the locale name in collate object
when same instance was used for those locales, and querylocale
reporting unexpected value for LC_COLLATE_MASK.

PR: 255646, 269375

Test Plan

See added test case.

Run other libc tests.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

yuripv created this revision.
This revision is now accepted and ready to land.May 6 2021, 11:42 AM
markj added inline comments.
lib/libc/tests/locale/newlocale_test.c
3

This should have an SPDX identifier I think.

yuripv edited the summary of this revision. (Show Details)

update the test case to make it cover all switches between these locales
add the spdx identifier

This revision now requires review to proceed.Mar 28 2023, 2:53 PM

Sorry, I completely forgot about this review, and now another PR was filed for the same problem. Could you please take another look? (I have updated the test case a bit for more complete switch testing).

markj added inline comments.
lib/libc/tests/locale/newlocale_test.c
99

style(9) no longer requires these blank lines.

This revision is now accepted and ready to land.Mar 28 2023, 2:56 PM