History log of /freebsd-10-stable/include/xlocale/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
304862 26-Aug-2016 ache

MFC r304703, r304755

1) _locale.h
LC_*_MASK bit shifting order was partially broken from the initial commit
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.

2) msgcat.c
Use current locale (f.e. set by thread). It was global locale always
previously.

PR: 211743

267465 14-Jun-2014 pfg

MFC r266865;

Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.

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

Bump __FreeBSD_version for ports that may be using the non-standard
reference.

Obtained from: DragonFlyBSD
Reviewed by: theraven

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


250883 21-May-2013 ed

Add <uchar.h>.

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


243032 14-Nov-2012 demon

Use defined() to test macro definitions.

Approved by: theraven


234573 22-Apr-2012 theraven

Fix a bug caused by some misplaced brackets.

Reported by: das


232931 13-Mar-2012 theraven

And remove the duplicate inlines...

Approved by: dim (mentor)


232929 13-Mar-2012 theraven

Fix the other missing prototypes.

Approved by: dim (mentor)


232927 13-Mar-2012 theraven

Add missing prototypes.

Approved by: dim (mentor)


232926 13-Mar-2012 theraven

More xlocale cleanups.

Approved by: dim (mentor)


232620 06-Mar-2012 dim

After r232498, programs built with -ansi or -std=c89 including <ctype.h>
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


232498 04-Mar-2012 theraven

Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
universe with gcc.

Approved by: dim (mentor)


231673 14-Feb-2012 theraven

Cleanup of xlocale:

- 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)