Commit Graph

366 Commits

Author SHA1 Message Date
riastradh
75f5a58349 Add man pages and xrefs for consttime_bcmp and explicit_bzero.
ok wiz
2013-06-23 16:44:06 +00:00
joerg
e0ac190e1e Provide explicit LC_C_LOCALE accessor and drop the various NULL checks.
Provide LC_GLOBAL_LOCALE in a way that works with all locale functions.
Merge constant data used by the initial global locale and the C locale.
Drop function call layer for _current_locale() and directly return the
locale reference, not a pointer to it. Use protected access for global
variables, so that libc references can avoid the GOT overhead.
2013-05-17 12:55:56 +00:00
joerg
e81d3f1ebf Add dummy strcoll_l and strxfrm_l. 2013-04-19 23:28:47 +00:00
joerg
10e0e4a06b Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l,
mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l.
2013-04-18 23:24:26 +00:00
wiz
695c00c96b Add "wide" to description. From OpenBSD via Ingo Schwarze. 2012-12-28 13:53:12 +00:00
drochner
8588929dc5 Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.
2012-08-30 12:16:48 +00:00
abs
9e66e6d75e Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
dholland
d66ac51d84 Mark these obsolete as well. 2012-05-05 21:24:19 +00:00
dholland
cf2f172048 Bump date for previous. 2012-05-05 21:18:43 +00:00
dholland
aa368b88e1 Describe these as obsolete. 2012-05-05 21:14:55 +00:00
christos
79f2de1232 size_t -> uint8_t 2012-03-21 00:35:50 +00:00
matt
504f867176 Use C89 Prototypes.
Remove use of __P
2012-03-20 17:44:17 +00:00
joerg
b05af17f87 If we have to cast, do it properly. 2011-11-25 17:48:22 +00:00
dholland
58632c2b81 Use CHAR_BIT; don't hardwire 8. Fix logic slightly to work with arbitrary
CHAR_BIT. Compiler output unchanged (on amd64).
2011-11-25 16:46:56 +00:00
tron
de9ace2de1 Add explicit casts to make lint happy and fix the NetBSD/i386 build. 2011-11-25 09:00:51 +00:00
joerg
d22a7f54f9 In wcscspn and wcspbrk, handle set size of 0 and 1 explicitly.
For larger sets, use a bloom filter to avoid the inner loop for most of
the input. The current implementation uses a simple modular hash as
first function (well suited for input e.g. in ISO Latin character sets)
and a more complex multiplicative hash as second function with a filter
size of 512 Bit. This reduces the typical run time to O(n+m).
2011-11-24 18:44:25 +00:00
joerg
64680c6b13 Handle simple cases (strlen(charset) <= 1) more efficiently. 2011-11-22 00:37:09 +00:00
joerg
7e173c1846 Clean up a bit in preparation for more serious changes 2011-11-21 15:02:48 +00:00
jym
b0471da334 Make strnlen(3) accessible in kernel. ok christos@. 2011-09-01 22:35:17 +00:00
dholland
75fea7f548 Add patch from Klaus Klein in PR 45258 to note that popcount32/64
require <stdint.h>.
2011-08-22 01:36:04 +00:00
martin
27868e15e9 Special-case the (unlikely in practice) call with len = 2 - previously
the code would not have swapped anything. Problem pointed out by
sparc64 automatic test run.
2011-01-04 17:14:07 +00:00
wiz
3d3c5d42cb Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
wiz
ecad7beb9c Bump date. 2010-10-25 07:37:11 +00:00
dholland
6d14a316d9 Mention err/warn. Note that they're generally preferred to perror().
Might want to strengthen the wording.
2010-10-24 23:10:51 +00:00
christos
6540fba480 consistency with c source 2010-07-05 00:45:19 +00:00
jruoho
c6d218be32 .Nm -> .Fn. 2010-04-30 03:52:13 +00:00
jruoho
6adec4717c Fix markup. 2010-04-29 17:17:18 +00:00
wiz
3292536e4b Add punctuation. 2010-04-29 07:27:30 +00:00
jruoho
157d0c3eea Add some STANDARDS lingo, mainly to note the functions that have been
removed from POSIX (2008).
2010-04-29 06:54:26 +00:00
jruoho
8cd9bb9479 Note the recent changes. 2010-04-29 05:42:04 +00:00
jruoho
2da6d4a4d9 Only put the actual header for the .In line. 2010-04-28 07:47:09 +00:00
jruoho
494f19760f Reference ffs32(3). Also note POSIX compliance and the movement of the
header from <string.h> to <strings.h>.
2010-04-28 07:44:04 +00:00
apb
67ca6b24d2 The number of byte pairs to swap is len/2, not len/2+1. 2010-04-18 11:39:39 +00:00
apb
fa3abaaeb7 Bitwise operations on signed types are well-defined if the values
happen to be positive, and indeed the values here were guaranteed
to be positive, but some compilers complained anyway, so convert
the bitwise operations to arithmetic operations.
2010-04-18 10:51:33 +00:00
christos
d403570167 simplify 2010-04-18 04:54:33 +00:00
christos
665a4f86a1 fix lint 2010-04-17 21:42:43 +00:00
wiz
96a3ffaf7c Remove trailing whitespace. 2010-04-17 20:29:20 +00:00
christos
885d0edc52 Change and document for POSIX compliance. 2010-04-17 17:57:39 +00:00
christos
b2cf198a4c add restrict 2010-04-17 17:50:13 +00:00
wiz
24e353786d Join URL. 2010-04-14 13:07:19 +00:00
jruoho
16a83e93ba Add the USENIX paper of Miller and de Raadt to SEE ALSO. 2010-04-14 11:07:20 +00:00
snj
550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
joerg
eb96fdd9a2 ffs(3) lives in strings.h, so include the correct header. ANSIfy. 2009-08-05 16:08:00 +00:00
dsl
027bacee22 Use a 'register only' str[c]spn() on 64 bit systems. 2009-07-30 21:42:06 +00:00
dsl
0d34d14bb9 If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
2009-07-30 20:57:15 +00:00
kleink
9be4603670 Declare strsignal(3) in <string.h>, per POSIX-2008, and adjust
documentation accordingly.

Fixes PR standards/41325 from Perry E. Metzger.
2009-07-22 19:48:27 +00:00
wiz
f21bef181d Add comma in enumeration. 2009-07-22 07:07:27 +00:00
joerg
0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
wiz
02079c4a1c Xref popcount(3). 2009-07-21 13:22:15 +00:00
wiz
345d7916c5 Fix typo, add comma in enumeration. 2009-07-21 13:21:41 +00:00