diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/data/locale/Makefile | 4 | ||||
-rw-r--r-- | usr/src/data/locale/Makefile.com | 7 | ||||
-rw-r--r-- | usr/src/data/locale/data/C.UTF-8.src | 11 | ||||
-rw-r--r-- | usr/src/lib/libc/port/locale/localeimpl.c | 17 | ||||
-rw-r--r-- | usr/src/pkg/manifests/SUNWcs.mf | 8 |
5 files changed, 42 insertions, 5 deletions
diff --git a/usr/src/data/locale/Makefile b/usr/src/data/locale/Makefile index e3313f5f58..99ee6a60ef 100644 --- a/usr/src/data/locale/Makefile +++ b/usr/src/data/locale/Makefile @@ -146,8 +146,8 @@ locale/%/$(DTIME): locale/%/stamp $(ROOTDATA): $(ROOTLOCDIRS) $(ROOTCATDIRS) $(DATA) $(RM) $@ - $(CP) $(@:$(ROOTLIB)/%=%) $@ - $(CHMOD) 0444 $@ + -$(CP) $(@:$(ROOTLIB)/%=%) $@ + $(CHMOD) -f 0444 $@ %.mo: %.po $(MSGFMT) -o $@ $< diff --git a/usr/src/data/locale/Makefile.com b/usr/src/data/locale/Makefile.com index 9264e3b4cf..8d82115f93 100644 --- a/usr/src/data/locale/Makefile.com +++ b/usr/src/data/locale/Makefile.com @@ -10,7 +10,7 @@ # # -# Copyright 2017 Nexenta Systems, Inc. +# Copyright 2019 Nexenta by DDN, Inc. All rights reserved. # Copyright 2011 EveryCity Ltd. All rights reserved. # Copyright 2013 DEY Storage Systems, Inc. # Copyright 2016 Joyent, Inc. @@ -92,7 +92,8 @@ ISO8859_15_LOCALES= \ KOI8_R_LOCALES= ru_RU -_UTF_8_LOCALES= af_ZA \ +_UTF_8_LOCALES= C \ + af_ZA \ ar_AE ar_BH ar_DZ ar_EG ar_IQ ar_JO ar_KW ar_LB ar_LY ar_MA \ ar_OM ar_QA ar_SA ar_TN ar_YE \ as_IN \ @@ -181,4 +182,4 @@ UTF_8_LOCALES= $(_UTF_8_LOCALES) \ # List of locales that happen to have translations for them present in the gate # zz_AA.UTF-8 locale used for testing translation TRANSLOCS= zz_AA.UTF-8 -PRIVTRANSLOCS= zz_AA.UTF-8 +PRIVTRANSLOCS= zz_AA.UTF-8 diff --git a/usr/src/data/locale/data/C.UTF-8.src b/usr/src/data/locale/data/C.UTF-8.src new file mode 100644 index 0000000000..2f2368608d --- /dev/null +++ b/usr/src/data/locale/data/C.UTF-8.src @@ -0,0 +1,11 @@ +comment_char * +escape_char / + +******************************************************************************** +* This file contains only empty LC_CTYPE section which will be replaced by the +* common.UTF-8.src contents, and all other sections are used from C locale. +******************************************************************************** + +LC_CTYPE +END LC_CTYPE + diff --git a/usr/src/lib/libc/port/locale/localeimpl.c b/usr/src/lib/libc/port/locale/localeimpl.c index 9083e0f16b..24c03d558a 100644 --- a/usr/src/lib/libc/port/locale/localeimpl.c +++ b/usr/src/lib/libc/port/locale/localeimpl.c @@ -128,6 +128,20 @@ __global_locale(void) } /* + * Locale data for hybrid C.UTF-8 locale having all the characteristics of + * default C/POSIX locale, except for LC_CTYPE data which is retrieved from + * cache/file as for other UTF-8 locales. + */ +static struct locdata cutf_locdata[LC_ALL] = { + { "C.UTF-8", NULL }, /* unused */ + { "C.UTF-8", &lc_numeric_posix }, + { "C.UTF-8", &lc_time_posix }, + { "C.UTF-8", &lc_collate_posix }, + { "C.UTF-8", &lc_monetary_posix }, + { "C.UTF-8", &lc_messages_posix }, +}; + +/* * Category names for getenv() Note that this was modified * for Solaris. See <iso/locale_iso.h>. */ @@ -315,6 +329,9 @@ locdata_get(int category, const char *locname) if ((strcmp(locname, "C") == 0) || (strcmp(locname, "POSIX") == 0)) return (posix_locale.locdata[category]); + if ((strcmp(locname, "C.UTF-8") == 0) && (category != LC_CTYPE)) + return (&cutf_locdata[category]); + return (locdata_get_cache(category, locname)); } diff --git a/usr/src/pkg/manifests/SUNWcs.mf b/usr/src/pkg/manifests/SUNWcs.mf index 0bdc473d00..a0204cdae6 100644 --- a/usr/src/pkg/manifests/SUNWcs.mf +++ b/usr/src/pkg/manifests/SUNWcs.mf @@ -208,6 +208,13 @@ dir path=usr/lib/inet dir path=usr/lib/inet/$(ARCH64) dir path=usr/lib/locale dir path=usr/lib/locale/C +dir path=usr/lib/locale/C.UTF-8 +dir path=usr/lib/locale/C.UTF-8/LC_COLLATE +dir path=usr/lib/locale/C.UTF-8/LC_CTYPE +dir path=usr/lib/locale/C.UTF-8/LC_MESSAGES +dir path=usr/lib/locale/C.UTF-8/LC_MONETARY +dir path=usr/lib/locale/C.UTF-8/LC_NUMERIC +dir path=usr/lib/locale/C.UTF-8/LC_TIME dir path=usr/lib/locale/C/LC_COLLATE dir path=usr/lib/locale/C/LC_CTYPE dir path=usr/lib/locale/C/LC_MESSAGES @@ -1179,6 +1186,7 @@ file path=usr/lib/isaexec mode=0555 file path=usr/lib/kssladm mode=0555 $(sparc_ONLY)file path=usr/lib/ld.so file path=usr/lib/libshare.so.1 +file path=usr/lib/locale/C.UTF-8/LC_CTYPE/LCL_DATA mode=0444 file path=usr/lib/makekey mode=0555 file path=usr/lib/more.help file path=usr/lib/newsyslog group=sys mode=0555 |