glibc/locale
Carlos O'Donell f5117c6504 Add 'codepoint_collation' support for LC_COLLATE.
Support a new directive 'codepoint_collation' in the LC_COLLATE
section of a locale source file. This new directive causes all
collation rules to be dropped and instead STRCMP (strcmp or
wcscmp) is used for collation of the input character set. This
is required to allow for a C.UTF-8 that contains zero collation
rules (minimal size) and sorts using code point sorting.

To date the only implementation of a locale with zero collation
rules is the C/POSIX locale. The C/POSIX locale provides
identity tables for _NL_COLLATE_COLLSEQMB and
_NL_COLLATE_COLLSEQWC that map to ASCII even though it has zero
rules. This has lead to existing fnmatch, regexec, and regcomp
implementations that require these tables. It is not correct
to use these tables when nrules == 0, but the conservative fix
is to provide these tables when nrules == 0. This assures that
existing static applications using a new C.UTF-8 locale with
'codepoint_collation' at least have functional range expressions
with ASCII e.g. [0-9] or [a-z]. Such static applications would
not have the fixes to fnmatch, regexec and regcomp that avoid
the use of the tables when nrules == 0. Future fixes to fnmatch,
regexec, and regcomp would allow range expressions to use the
full set of code points for such ranges.

Tested on x86_64 and i686 without regression.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-09-06 11:06:45 -04:00
..
bits Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
programs Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
tst-localedef-path-norm.root localedef: Add verbose messages for failure paths. 2020-04-26 13:55:58 -04:00
broken_cur_max.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C_name.c Update. 2001-04-06 17:49:18 +00:00
C-address.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-collate-seq.c Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
C-collate.c Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
C-ctype.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-identification.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-measurement.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-messages.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-monetary.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-name.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-numeric.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-paper.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-telephone.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-time.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
C-translit.h.in Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
categories.def Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
coll-lookup.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
coll-lookup.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
duplocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
elem-hash.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
findlocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
freelocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
gen-translit.py get-translit.py: Fix typo 2021-05-11 12:55:45 +05:30
global-locale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hashval.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
indigits.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
indigitswc.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
iso-639.def Add mnw language code [BZ #25139] 2019-11-06 08:15:16 +01:00
iso-3166.def Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
iso-4217.def Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
langinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-address.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-collate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-ctype.c locale: Use compat_symbol_reference in _nl_postload_ctype 2021-03-25 11:06:58 +01:00
lc-identification.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-measurement.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-messages.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-monetary.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-name.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-numeric.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-paper.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-telephone.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-time.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
loadarchive.c Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
loadlocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locale.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localeconv.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localeinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localename.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locarchive.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mb_cur_max.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
newlocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
nl_langinfo_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nl_langinfo.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
outdigits.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
outdigitswc.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
setlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen-hash.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
SYS_libc.c [BZ #284, BZ #721] 2005-02-17 01:19:55 +00:00
tst-C-locale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-duplocale.c Add missing test files. 2009-11-17 16:23:57 -08:00
tst-locale-locpath.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-localedef-path-norm.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-locname.c Add missing test files. 2009-11-17 16:23:57 -08:00
uselocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions * sysdeps/ia64/dl-fptr.c (__ia64_make_fptr): Revert last change. 2003-03-03 09:45:25 +00:00
weight.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
weightwc.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
xlocale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30