summaryrefslogtreecommitdiff
path: root/include/xlocale
Commit message (Collapse)AuthorAgeFilesLines
* Implement strerror_l().Konstantin Belousov2020-12-161-0/+1
| | | | | | | | | | | | | | Only for the arches that provide user-mode TLS. PR: 251651 Requested by: yuri Discussed with: emaste, jilles, tijl Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27495 MFC after: 2 weeks Notes: svn path=/head/; revision=368692
* Add collation version support to querylocale(3).Thomas Munro2020-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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: svn path=/head/; revision=367476
* include: General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2511-0/+22
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326192
* LC_*_MASK bit shifting order was partially broken from the initial commitAndrey A. Chernov2016-08-231-4/+5
| | | | | | | | | | | | | | | | | | | | | time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the right order. The order here should match XLC_* from "xlocale_private.h" which, in turn, match LC_* publicly visible order from <locale.h> which determines how locale components are stored in the structure. LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() and equivalent shift loop in the newlocale(), so mapped to some wrong components (excluding two mentioned above). Formally the fix is ABI breakage, but old code using those masks never works properly in any case. Only newlocale() and querylocale() are affected. MFC after: 7 days Notes: svn path=/head/; revision=304703
* Change the return type of freelocale(3) to void.Ed Schouten2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | Our version of this function currently returns an integer indicating failure or success, whereas POSIX specifies that this function has no return value. It returns void. Patch up the header, sources and man page to use the right type. While there, use the opportunity to simplify the body of this function. Theoretically speaking, this change breaks the ABI of this function. That said, I have yet to find any code that makes use of freelocale()'s return value. I couldn't find any of it in the base system, nor did an exp-run reveal any breakage caused by this change. PR: 211394 (exp-run) Notes: svn path=/head/; revision=303495
* Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t.Ed Schouten2016-07-281-1/+1
| | | | | | | | | | | | POSIX requires that MB_CUR_MAX expands to an expression of type size_t. It currently expands to an int. As these are already macros, don't change the underlying type of these functions. There is no ned to touch those. Differential Revision: https://reviews.freebsd.org/D6645 Notes: svn path=/head/; revision=303427
* Commit log from Dragonfly:Baptiste Daroussin2015-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never actually implemented it. The isnumber() function was equivalent to the isdigit() function in every case. Now that DragonFly's ctype source files have number definitions, the number ctype can finally be implemented. It's given a new flag _CTYPE_N. The isalnum() and iswalnum() functions have been changed to use this flag rather than the _CTYPE_D digit flag. While isalnum(), isnumber(), and their wide equivalents now return different values in locale cases, the ishexnumber() and iswhexnumber() functions are unchanged. They are still aliases for isxdigit() and iswxdigit(). Also change ctype.h for isdigit and isxdigit to use sbistype like the other functions. Obtained from: dragonfly Notes: svn path=/projects/collation/; revision=289263
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge head from 7/28Simon J. Gerraty2014-08-193-3/+49
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * \ Merge from headSimon J. Gerraty2013-09-052-1/+47
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync with HEAD.David E. O'Brien2013-02-081-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-222-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | Remove NO_OBJSimon J. Gerraty2015-06-111-1/+0
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For meta mode we will want objdirs. Differential Revision: D2748 Reviewed by: brooks imp Notes: svn path=/head/; revision=284255
* | | | Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.Pedro F. Giffuni2014-05-303-3/+49
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX.1-2008 specifies that those two functions should be declared by including <strings.h>, not <string.h> (the latter only has strcoll_l() and strxfrm_l()): http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html Obtained from: DragonFlyBSD Reviewed by: theraven MFC after: 2 weeks Notes: svn path=/head/; revision=266865
* | | Add <uchar.h>.Ed Schouten2013-05-212-1/+47
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven Notes: svn path=/head/; revision=250883
* | Use defined() to test macro definitions.Dmitry Sivachenko2012-11-141-1/+1
|/ | | | | | | Approved by: theraven Notes: svn path=/head/; revision=243032
* Fix a bug caused by some misplaced brackets.David Chisnall2012-04-221-2/+2
| | | | | | | Reported by: das Notes: svn path=/head/; revision=234573
* And remove the duplicate inlines...David Chisnall2012-03-131-2/+2
| | | | | | | Approved by: dim (mentor) Notes: svn path=/head/; revision=232931
* Fix the other missing prototypes.David Chisnall2012-03-131-0/+5
| | | | | | | Approved by: dim (mentor) Notes: svn path=/head/; revision=232929
* Add missing prototypes.David Chisnall2012-03-131-0/+5
| | | | | | | Approved by: dim (mentor) Notes: svn path=/head/; revision=232927
* More xlocale cleanups.David Chisnall2012-03-131-26/+26
| | | | | | | Approved by: dim (mentor) Notes: svn path=/head/; revision=232926
* After r232498, programs built with -ansi or -std=c89 including <ctype.h>Dimitry Andric2012-03-061-2/+2
| | | | | | | | | | | would not compile anymore, due to plain 'inline' keywords. Fix this by using __inline instead. Reported by: Jia-Shiun Li <jiashiun@gmail.com> Discussed with: theraven Notes: svn path=/head/; revision=232620
* Reapply 227753 (xlocale cleanup), plus some fixes so that it passes buildDavid Chisnall2012-03-0411-0/+763
| | | | | | | | | universe with gcc. Approved by: dim (mentor) Notes: svn path=/head/; revision=232498
* Revert r231673 and r231682 for now, until we can run a full makeDimitry Andric2012-02-1411-752/+0
| | | | | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks Notes: svn path=/head/; revision=231714
* Cleanup of xlocale:David Chisnall2012-02-1411-0/+752
- Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor) Notes: svn path=/head/; revision=231673