diff options
author | Thomas Munro <tmunro@FreeBSD.org> | 2020-11-08 02:50:34 +0000 |
---|---|---|
committer | Thomas Munro <tmunro@FreeBSD.org> | 2020-11-08 02:50:34 +0000 |
commit | cc7edd258c2564fe9e3c4a0dc839acc4a71caff9 (patch) | |
tree | 713e7f140bcc509d153f6843f0c0c4e93cf43991 /share/colldef | |
parent | d2799054f0d29c33a1f2ab87ee4d88970ec36d91 (diff) | |
download | src-test2-cc7edd258c2564fe9e3c4a0dc839acc4a71caff9.tar.gz src-test2-cc7edd258c2564fe9e3c4a0dc839acc4a71caff9.zip |
Add collation version support to querylocale(3).
Provide a way to ask for an opaque version string for a locale_t, so
that potential changes in sort order can be detected. Similar to
ICU's ucol_getVersion() and Windows' GetNLSVersionEx(), this API is
intended to allow databases to detect when text order-based indexes
might need to be rebuilt.
The CLDR version is extracted from CLDR source data by the Makefile
under tools/tools/locale, written into the machine-generated Makefile
under shared/colldef, passed to localedef -V, and then written into
LC_COLLATE file headers. The initial version is 34.0.
tools/tools/locale was recently updated to pull down 35.0, but the
output hasn't been committed under share/colldef yet, so that will
provide the first observable change when it happens. Other versioning
schemes are possible in future, because the format is unspecified.
Reviewed by: bapt, 0mp, kib, yuripv (albeit a long time ago)
Differential Revision: https://reviews.freebsd.org/D17166
Notes
Notes:
svn path=/head/; revision=367476
Diffstat (limited to 'share/colldef')
-rw-r--r-- | share/colldef/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/colldef/Makefile b/share/colldef/Makefile index f8db9608c47b..e7c93d300c91 100644 --- a/share/colldef/Makefile +++ b/share/colldef/Makefile @@ -7,10 +7,13 @@ FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps +CLDR_VERSION= "34.0" + .include <bsd.endian.mk> .src.LC_COLLATE: localedef ${LOCALEDEF_ENDIAN} -D -U -i ${.IMPSRC} \ + -V ${CLDR_VERSION} \ -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} ${.OBJDIR}/${.IMPSRC:T:R} LOCALES+= af_ZA.UTF-8 @@ -227,6 +230,7 @@ FILES+= $t.LC_COLLATE FILESDIR_$t.LC_COLLATE= ${LOCALEDIR}/$t $t.LC_COLLATE: ${.CURDIR}/$f.src localedef ${LOCALEDEF_ENDIAN} -D -U -i ${.ALLSRC} \ + -V ${CLDR_VERSION} \ -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} \ ${.OBJDIR}/${.TARGET:T:R} .endfor |