summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale
Commit message (Collapse)AuthorAgeFilesLines
* Replace the #define for "iconv" so it is for the function name instead ofpeter2013-07-032-2/+4
| | | | | | a macro with parameters. Remove a __DECONST hack and add consts instead for gnu libiconv API compatability. This makes it work with things like devel/boost-libs that expects to use "iconv" as though it were a pointer.
* Add libiconv based versions of *c16*() and *c32*().ed2013-06-037-3/+314
| | | | | | | | | | | | | I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor
* Add <uchar.h>.ed2013-05-219-52/+410
| | | | | | | | | | | | 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
* Document that the return type is different from 1003.1-2008.pluknet2013-05-041-2/+9
| | | | MFC after: 1 week
* mdoc: missing comma in .Dd macro.pluknet2013-05-045-5/+5
|
* Also, add a missing period.pluknet2013-05-033-3/+3
|
* Remove an extra comma.pluknet2013-05-033-3/+3
|
* Remove the STANDARDS section.pluknet2013-05-031-4/+1
| | | | | | querylocale is not part of IEEE Std 1003.1-2008. MFC after: 3 days
* btowc(3), isblank(3): Correct prototypes for _l variants.jilles2013-03-272-3/+3
| | | | MFC after: 1 week
* libc: Make various internal file descriptors close-on-exec.jilles2012-12-112-2/+2
| | | | These are obtained via fopen().
* Improve style(9) compliance of function declarations.brooks2012-12-101-4/+12
|
* libc: Use O_CLOEXEC for various internal file descriptors.jilles2012-09-291-1/+1
| | | | | | | | | This fixes a race condition where another thread may fork() before CLOEXEC is set, unintentionally passing the descriptor to the child process. This commit only adds O_CLOEXEC flags to open() or openat() calls where no fcntl(fd, F_SETFD, FD_CLOEXEC) follows. The separate fcntl() call still leaves a race window so it should be fixed later.
* Remove trailing whitespace.joel2012-07-301-1/+1
|
* Add more locale-specific functions to the relevant man pages and Makefile:issyl02012-07-306-14/+86
| | | | | | | | | | | | - lib/libc/locale/islower.3 - lib/libc/locale/ispunct.3 - lib/libc/locale/nl_langinfo.3 - lib/libc/locale/isgraph.3 - lib/libc/locale/isspace.3 Reviewed by: bz Approved by: theraven MFC after: 5 days
* Start manpage with Dd macro and also remove a trailing whitespacejoel2012-07-261-2/+2
| | | | while here.
* Add a new man page containing details of new locale-specific functions forissyl02012-07-252-1/+182
| | | | | | | | wctype.h, iswalnum_l(3). Add it and its functions to the Makefile. Reviewed by: gavin, jilles Approved by: theraven MFC after: 5 days
* Restore the __collate_load_error global that was accidentally removed in thetheraven2012-07-062-5/+6
| | | | | | xlocale refactoring. MFC after: 1 week
* ctype_l(3): Note that not all these functions are specified by POSIX.1-2008.jilles2012-07-011-1/+14
| | | | | | | The function isascii_l() is not in POSIX even though isascii() is, probably because isascii() is marked as obsolete. The other functions, like digittoint_l() and ishexnumber_l(), are FreeBSD-specific just like their non-_l versions.
* Fix a leak when setting the global character locale to "C" from something else.theraven2012-06-111-7/+13
| | | | Reported by: mm
* General mdoc(7) and typo fixes.gjb2012-05-116-9/+9
| | | | | | PR: 167734 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* Fix copy/paste error in lib/libc/locale/toupper.c.dim2012-05-101-1/+1
| | | | Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
* Fix some incorrect symbol versions.theraven2012-04-221-4/+4
| | | | Reported by: das
* mdoc: fix function type.joel2012-04-071-1/+1
|
* mdoc: fix column names, indentation, column separation within each row, andjoel2012-04-0711-96/+97
| | | | | | | quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer
* Remove trailing whitespace per mdoc lint warningeadler2012-03-297-8/+8
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* mdoc: remove unknown macro.joel2012-03-262-2/+0
|
* mdoc: remove empty lines.joel2012-03-262-2/+0
|
* mdoc: document title should be all caps.joel2012-03-251-1/+1
|
* Make sure sections are sorted into conventional order.joel2012-03-252-24/+24
|
* Remove superfluous paragraph macro.joel2012-03-2510-10/+0
|
* Make __get_locale() static inline, not just inline, so when compiling libc intheraven2012-03-191-1/+1
| | | | | | debug mode (without optimisations) it doesn't generate a linker failure. Approved by: dim (mentor)
* First set of xlocale man pages. More to follow...theraven2012-03-1310-2/+223
| | | | Approved by: dim (mentor)
* More xlocale cleanups.theraven2012-03-131-0/+4
| | | | Approved by: dim (mentor)
* Fix build of libc.so after r232620. This caused a duplicate definitiondim2012-03-061-0/+6
| | | | | | of __getCurrentRuneLocale(). Pointy hat to: me
* Remove some duplicated copyright notices.theraven2012-03-061-5/+0
| | | | Approved by: dim (mentor)
* Reapply 227753 (xlocale cleanup), plus some fixes so that it passes buildtheraven2012-03-045-29/+115
| | | | | | universe with gcc. Approved by: dim (mentor)
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-145-115/+29
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
* Fix a misplaced __NO_TLS locations, and change a GNUism to a C11ism fortheraven2012-02-142-3/+5
| | | | | | consistency. Approved by: brooks (mentor)
* Cleanup of xlocale:theraven2012-02-145-29/+113
| | | | | | | | | | | | | | | | - 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)
* wctob() returns EOF and not WEOF.delphij2012-02-141-2/+2
| | | | | Noticed by: Zhihao Yuan <lichray gmail com> MFC after: 1 week
* libc: Eliminate some relative relocations in setlocale().jilles2011-12-271-1/+1
|
* libc: Eliminate 13 relative relocations in wctype().jilles2011-12-051-26/+45
|
* Split sentences at period boundaries.obrien2011-12-027-73/+93
|
* Fix a crash when trying to duplicate a locale that contains some implicit C ↵theraven2011-11-221-1/+6
| | | | | | | locale components. Reported by: Michael Butler Approved by: dim (mentor)
* Implement xlocale APIs from Darwin, mainly for use by libc++. This adds atheraven2011-11-2069-453/+2646
| | | | | | | | | | | | load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
* Fix grammar.schweikh2011-09-271-3/+3
| | | | | | PR: 140457 Submitted by: jeremyhu AT apple.com MFC after: 2 weeks
* Revert most of r210764, now that mdocml does the rightuqs2010-12-281-1/+1
| | | | | | thing with empty quotation macros. Requested by: Alex Kozlov
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-082-2/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Powerpc is special here. powerpc and powerpc64 use different ABIs, soimp2010-08-241-1/+1
| | | | | | their implementations aren't in the same files. Introduce LIBC_ARCH and use that in preference to MACHINE_CPUARCH. Tested by amd64 and powerpc64 builds (thanks nathanw@)
* MFtbemd:imp2010-08-231-1/+1
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
OpenPOWER on IntegriCloud