include: General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manua
include: General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
LC_*_MASK bit shifting order was partially broken from the initial committime at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in theright order.The order here should match XLC_* from "xl
LC_*_MASK bit shifting order was partially broken from the initial committime at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in theright order.The order here should match XLC_* from "xlocale_private.h" which, in turn,match LC_* publicly visible order from <locale.h> which determines howlocale 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 wrongcomponents (excluding two mentioned above).Formally the fix is ABI breakage, but old code using those masksnever works properly in any case.Only newlocale() and querylocale() are affected.MFC after: 7 days
Change the return type of freelocale(3) to void.Our version of this function currently returns an integer indicatingfailure or success, whereas POSIX specifies that this function has noreturn val
Change the return type of freelocale(3) to void.Our version of this function currently returns an integer indicatingfailure or success, whereas POSIX specifies that this function has noreturn value. It returns void. Patch up the header, sources and man pageto use the right type. While there, use the opportunity to simplify thebody 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()'sreturn value. I couldn't find any of it in the base system, nor did anexp-run reveal any breakage caused by this change.PR: 211394 (exp-run)
Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t.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'tcha
Change type of MB_CUR_MAX and MB_CUR_MAX_L() to size_t.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'tchange the underlying type of these functions. There is no ned to touchthose.Differential Revision: https://reviews.freebsd.org/D6645
Commit log from Dragonfly:FreeBSD extended ctypes to include numbers (e.g. isnumber()) but neveractually implemented it. The isnumber() function was equivalent to theisdigit() function in every
Commit log from Dragonfly:FreeBSD extended ctypes to include numbers (e.g. isnumber()) but neveractually implemented it. The isnumber() function was equivalent to theisdigit() function in every case.Now that DragonFly's ctype source files have number definitions, thenumber ctype can finally be implemented. It's given a new flag _CTYPE_N.The isalnum() and iswalnum() functions have been changed to use thisflag rather than the _CTYPE_D digit flag.While isalnum(), isnumber(), and their wide equivalents now returndifferent values in locale cases, the ishexnumber() and iswhexnumber()functions are unchanged. They are still aliases for isxdigit() andiswxdigit().Also change ctype.h for isdigit and isxdigit to use sbistype like theother functions.Obtained from: dragonfly
Fix typo when deregistering the VLAN unconfig event handlerSubmitted by: Masao Uebayashi <[email protected]>MFC after: 3 days
dirdeps.mk now sets DEP_RELDIR
Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.POSIX.1-2008 specifies that those two functions should be declared byincluding <strings.h>, not <string.h> (the latter only has strcoll
Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.POSIX.1-2008 specifies that those two functions should be declared byincluding <strings.h>, not <string.h> (the latter only has strcoll_l()and strxfrm_l()):http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.htmlObtained from: DragonFlyBSDReviewed by: theravenMFC after: 2 weeks
Add <uchar.h>.The <uchar.h> header, part of C11, adds a small number of utilityfunctions for 16/32-bit "universal" characters, which may or may not beUTF-16/32. As our wchar_t is already ISO 1064
Add <uchar.h>.The <uchar.h> header, part of C11, adds a small number of utilityfunctions for 16/32-bit "universal" characters, which may or may not beUTF-16/32. As our wchar_t is already ISO 10646, simply add light-weightwrappers around wcrtomb() and mbrtowc().While there, also add (non-yet-standard) _l functions, similar to theones we already have for the other locale-dependent functions.Reviewed by: theraven
Updated dependencies
Use defined() to test macro definitions.Approved by: theraven
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Requested by: Simon Gerraty <[email protected]>
Fix a bug caused by some misplaced brackets.Reported by: das
And remove the duplicate inlines...Approved by: dim (mentor)
Fix the other missing prototypes.Approved by: dim (mentor)
Add missing prototypes.Approved by: dim (mentor)
More xlocale cleanups.Approved by: dim (mentor)
After r232498, programs built with -ansi or -std=c89 including <ctype.h>would not compile anymore, due to plain 'inline' keywords. Fix this byusing __inline instead.Reported by: Jia-Shiun Li <ji
After r232498, programs built with -ansi or -std=c89 including <ctype.h>would not compile anymore, due to plain 'inline' keywords. Fix this byusing __inline instead.Reported by: Jia-Shiun Li <[email protected]>Discussed with: theraven
Reapply 227753 (xlocale cleanup), plus some fixes so that it passes builduniverse with gcc.Approved by: dim (mentor)
Revert r231673 and r231682 for now, until we can run a full makeuniverse with them. Sorry for the breakage.Pointy hat to: me and brooks
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.- Reo
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)