jilles
fba61ef227
libc: Use O_CLOEXEC for various internal file descriptors.
...
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.
2012-09-29 11:54:34 +00:00
joel
84ed784b36
Remove trailing whitespace.
2012-07-30 21:02:44 +00:00
issyl0
6a683d47fc
Add more locale-specific functions to the relevant man pages and Makefile:
...
- 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
2012-07-30 20:56:19 +00:00
joel
dcf3898747
Start manpage with Dd macro and also remove a trailing whitespace
...
while here.
2012-07-26 14:46:19 +00:00
issyl0
430cf8efee
Add a new man page containing details of new locale-specific functions for
...
wctype.h, iswalnum_l(3). Add it and its functions to the Makefile.
Reviewed by: gavin, jilles
Approved by: theraven
MFC after: 5 days
2012-07-25 22:17:44 +00:00
theraven
3fd9819783
Restore the __collate_load_error global that was accidentally removed in the
...
xlocale refactoring.
MFC after: 1 week
2012-07-06 20:16:22 +00:00
jilles
1e8cef649c
ctype_l(3): Note that not all these functions are specified by POSIX.1-2008.
...
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.
2012-07-01 22:18:20 +00:00
theraven
1b6b7176ba
Fix a leak when setting the global character locale to "C" from something else.
...
Reported by: mm
2012-06-11 14:02:02 +00:00
gjb
8670397617
General mdoc(7) and typo fixes.
...
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
2012-05-11 20:06:46 +00:00
dim
3be8548129
Fix copy/paste error in lib/libc/locale/toupper.c.
...
Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
2012-05-10 20:03:34 +00:00
theraven
aeabc6ab90
Fix some incorrect symbol versions.
...
Reported by: das
2012-04-22 18:51:38 +00:00
joel
ccd4f1d859
mdoc: fix function type.
2012-04-07 09:26:21 +00:00
joel
0ef023ae5b
mdoc: fix column names, indentation, column separation within each row, and
...
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
2012-04-07 09:05:30 +00:00
eadler
1ef5fe44d3
Remove trailing whitespace per mdoc lint warning
...
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
2012-03-29 05:02:12 +00:00
joel
d37628cc98
mdoc: remove unknown macro.
2012-03-26 19:06:59 +00:00
joel
5879f1f169
mdoc: remove empty lines.
2012-03-26 15:30:28 +00:00
joel
96b099d4c4
mdoc: document title should be all caps.
2012-03-25 19:34:05 +00:00
joel
db7581ccf5
Make sure sections are sorted into conventional order.
2012-03-25 16:00:56 +00:00
joel
39c40cce12
Remove superfluous paragraph macro.
2012-03-25 12:13:24 +00:00
theraven
f3af7bf15c
Make __get_locale() static inline, not just inline, so when compiling libc in
...
debug mode (without optimisations) it doesn't generate a linker failure.
Approved by: dim (mentor)
2012-03-19 11:47:37 +00:00
theraven
984b6cc8df
First set of xlocale man pages. More to follow...
...
Approved by: dim (mentor)
2012-03-13 20:02:41 +00:00
theraven
75aeb0cde5
More xlocale cleanups.
...
Approved by: dim (mentor)
2012-03-13 14:14:13 +00:00
dim
d62ff6ee49
Fix build of libc.so after r232620. This caused a duplicate definition
...
of __getCurrentRuneLocale().
Pointy hat to: me
2012-03-06 21:56:30 +00:00
theraven
1c33114ffd
Remove some duplicated copyright notices.
...
Approved by: dim (mentor)
2012-03-06 12:53:44 +00:00
theraven
b0968176b3
Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
...
universe with gcc.
Approved by: dim (mentor)
2012-03-04 15:31:13 +00:00
dim
22f749d90e
Revert r231673 and r231682 for now, until we can run a full make
...
universe with them. Sorry for the breakage.
Pointy hat to: me and brooks
2012-02-14 21:48:46 +00:00
theraven
21ab7f5574
Fix a misplaced __NO_TLS locations, and change a GNUism to a C11ism for
...
consistency.
Approved by: brooks (mentor)
2012-02-14 14:24:37 +00:00
theraven
b529e734cb
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)
2012-02-14 12:03:23 +00:00
delphij
b1b5a178f6
wctob() returns EOF and not WEOF.
...
Noticed by: Zhihao Yuan <lichray gmail com>
MFC after: 1 week
2012-02-14 02:03:17 +00:00
jilles
38173b70a2
libc: Eliminate some relative relocations in setlocale().
2011-12-27 23:28:01 +00:00
jilles
1a47fa14a8
libc: Eliminate 13 relative relocations in wctype().
2011-12-05 00:00:47 +00:00
obrien
2105513eb4
Split sentences at period boundaries.
2011-12-02 11:55:09 +00:00
theraven
da7efa5819
Fix a crash when trying to duplicate a locale that contains some implicit C locale components.
...
Reported by: Michael Butler
Approved by: dim (mentor)
2011-11-22 14:11:42 +00:00
theraven
0f6ef690b3
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
...
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)
2011-11-20 14:45:42 +00:00
schweikh
43a4fd1bbd
Fix grammar.
...
PR: 140457
Submitted by: jeremyhu AT apple.com
MFC after: 2 weeks
2011-09-27 17:54:10 +00:00
uqs
1f1cd9cdf4
Revert most of r210764, now that mdocml does the right
...
thing with empty quotation macros.
Requested by: Alex Kozlov
2010-12-28 10:08:50 +00:00
uqs
8ae3afcfad
mdoc: drop redundant .Pp and .LP calls
...
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
imp
a34c7e0187
Powerpc is special here. powerpc and powerpc64 use different ABIs, so
...
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@)
2010-08-24 20:54:43 +00:00
imp
c3a399c4ba
MFtbemd:
...
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
uqs
02bd58e3fa
mdoc: remove unbalanced quotes
2010-08-02 13:11:41 +00:00
uqs
685dd51364
mdoc: make sure to pass at least one argument to quotation macros
2010-08-02 13:11:35 +00:00
bcr
f5f85a4951
Apply a small grammar fix to {toupper,tolower}(3).
...
PR: docs/140458
Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com)
MFC after: 5 days
2010-07-25 13:32:19 +00:00
uqs
c1a4648187
mdoc: simplify quotation scheme
...
Reviewed by: brueffer
2010-05-11 23:08:38 +00:00
uqs
f2706fbed3
mdoc: remove .Pp where not needed
...
This trips up mdocml and can simply go away.
Reviewed by: ru
Approved by: philip, ed (mentors)
2010-04-14 18:29:26 +00:00
brueffer
9e5ddbc9f2
Fix grammar.
...
PR: 140459
Submitted by: Jeremy Huddleston <Jeremyhu@apple.com>
MFC after: 1 week
2009-11-16 14:33:31 +00:00
roam
6a7fcf9184
Fix the grammar in the isprint(3) description.
...
PR: 140456
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
2009-11-13 09:07:33 +00:00
roam
668062ce47
Fix the grammar in the isgraph(3) description, almost as per the PR.
...
PR: 140455
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 2 weeks
2009-11-13 09:03:50 +00:00
roam
ec9fee44c1
Fix the grammar as in the PR, and then some.
...
PR: 140454
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 2 weeks
2009-11-11 11:31:02 +00:00
edwin
1b3420e9d4
Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
...
Also modify the "-k list" option to display only fields with a certain prefix.
MFC after: 1 week
2009-10-05 07:13:15 +00:00
des
b1eaddb48f
Let the armchair generals handle this one.
2009-09-04 07:44:58 +00:00