| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
querylocale is not part of IEEE Std 1003.1-2008.
MFC after: 3 days
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
These are obtained via fopen().
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
while here.
|
|
|
|
|
|
|
|
| |
wctype.h, iswalnum_l(3). Add it and its functions to the Makefile.
Reviewed by: gavin, jilles
Approved by: theraven
MFC after: 5 days
|
|
|
|
|
|
| |
xlocale refactoring.
MFC after: 1 week
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reported by: mm
|
|
|
|
|
|
| |
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
|
|
|
|
| |
Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
|
|
|
|
| |
Reported by: das
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
debug mode (without optimisations) it doesn't generate a linker failure.
Approved by: dim (mentor)
|
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
|
|
| |
of __getCurrentRuneLocale().
Pointy hat to: me
|
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
|
|
| |
universe with gcc.
Approved by: dim (mentor)
|
|
|
|
|
|
| |
universe with them. Sorry for the breakage.
Pointy hat to: me and brooks
|
|
|
|
|
|
| |
consistency.
Approved by: brooks (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
|
| |
Noticed by: Zhihao Yuan <lichray gmail com>
MFC after: 1 week
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
locale components.
Reported by: Michael Butler
Approved by: dim (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
PR: 140457
Submitted by: jeremyhu AT apple.com
MFC after: 2 weeks
|
|
|
|
|
|
| |
thing with empty quotation macros.
Requested by: Alex Kozlov
|
|
|
|
| |
They have no effect when coming in pairs, or before .Bl/.Bd
|
|
|
|
|
|
| |
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@)
|
|
|
|
|
| |
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
|