glibc/locale/programs
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
..
3level.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-dir.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-dir.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-kw.gperf Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
charmap-kw.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
charmap.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
charmap.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
config.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-address.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-collate.c Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
ld-ctype.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-identification.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-measurement.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-messages.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-monetary.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-name.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-numeric.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-paper.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-telephone.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ld-time.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
linereader.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
linereader.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locale-spec.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locale.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
localedef.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
localedef.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locarchive.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locfile-kw.gperf Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
locfile-kw.h Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
locfile-token.h Add 'codepoint_collation' support for LC_COLLATE. 2021-09-06 11:06:45 -04:00
locfile.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locfile.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
record-status.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
record-status.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
repertoire.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
repertoire.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
simple-hash.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
simple-hash.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
xasprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xmalloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xstrdup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00