schwarze
371b65730c
New POSIX xlocale implementation written from scratch.
Complete in the sense that all POSIX *locale(3) and *_l(3) functions
are included, but in OpenBSD, we of course only really care about
LC_CTYPE and we only support ASCII and UTF-8.
With important help from kettenis@, guenther@, and jca@.
Repeated testing in ports bulk builds by naddy@.
Additional testing by jca@, sebastia@, dcoppa@, and others.
OK kettenis@ dcoppa@, and guenther@ on an earlier version.
Riding guenther@'s libc/librthread major bump.
7 years ago
millert
4c5bec1286
Move the 10 (!) defintions of NULL to their own mini header file and
update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
8 years ago
millert
8c8787aac5
POSIX says that ffs(), strcasecmp(), strncasecmp(), r?index() and
the b* byte functions belong in strings.h, not string.h so break
them out of string.h into a new strings.h. As long as there is no
POSIX or X/OPEN define in use string.h will pull in strings.h.
OK naddy@ deraadt@
9 years ago
guenther
9500f597f2
Delete duplicate conditional
diff from frantisek holop (minusf (at) obiit.org)
10 years ago
matthew
f82197f5b3
Add timingsafe_memcmp().
ok deraadt, jmc, tedu
10 years ago
tedu
2beb8f104d
add explicit_bzero to libc. implementation subject to change, but start
the ball rolling. ok deraadt.
10 years ago
ajacoutot
479d5fd1ec
Add an implementation of memmem() -- from FreeBSD with some tweaks.
Requires a libc minor bump, committing now so that we have up-to-date
snapshots for the upcoming hackathon.
joint work with millert@
man page bits ok jmc@
input and ok millert@, guenther@, deraadt@
11 years ago
guenther
b261f1e443
Add 'restrict' per POSIX, per prodding by tedu@. (Might permit more warnings?)
Tweak standards exposure of memchr (never) and strdup (POSIX-2008)
Remove unnecessary tests of __BSD_VISIBLE
ok millert@
11 years ago
guenther
8bebb650be
strsignal() was added to POSIX-2008; strerror_r() was in the base
of POSIX-2001, without the XSI qualifier. Adjust conditionals to match.
ok millert@
12 years ago
guenther
53bd3de409
Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.
Includes friendly linker warning to wake up those dumb enough to use it.
Committing for kettenis@, who ran away to the hills after writing it
12 years ago
jsg
a76303a0c4
As pointed out by Richard Guenther our definition
of NULL was incorrect for c++ compilers that aren't
gcc (or pretend to be gcc like clang).
ok miod@
13 years ago
miod
3409dda593
Define NULL as a void * instead of a long integer, as required by Single Unix.
Kernel and bootblocks still use the old 0L value until all the NULL abuses
in the code are fixed.
13 years ago
matthew
d3d805ce3b
Add timingsafe_bcmp(3) to libc, mention that it's already in the
kernel in kern(9), and remove it from OpenSSH.
ok deraadt@, djm@
14 years ago
tedu
bbe8fdc923
add posix_madvise, posix_memalign, strndup, and strnlen. mostly from
brad and millert, with hints from guenther, jmc, and otto I think.
ok previous.
14 years ago
millert
f5ac8d80cf
add memrchr(3)
17 years ago
millert
605c5586ca
Adapt things to use __type_t instead of _BSD_TYPE_T_
Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable
19 years ago
millert
5acf200b2a
First step in include files overhaul. Use __FOO_VISIBLE (as defined
in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace
pollution issues, including the byte order defines. OK deraadt@
19 years ago
deraadt
3f1febb4bc
strcasestr(3), a case-insensitive version of strstr(3). already in netbsd
and freebsd, apparently written by torek, the man we never see anymore;
submitted by jcs, but he is not around right now for the libc major crank
so i sneak it in for him
19 years ago
avsm
95bbd623be
add bounds check for src pointer in bcopy(3) as well as dest pointer,
noticed by millert@
20 years ago
avsm
3f2bee58c7
add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
21 years ago
avsm
b75b1238ee
backout the __bounded__ attributes for a while; requested by deraadt@
21 years ago
avsm
3ab653a0d9
Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this!
deraadt@ ok
21 years ago
millert
cc6797b16c
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.
21 years ago
marc
066faed74e
add prototype for strerror_r
22 years ago
millert
9a61bb23a6
NULL is now 0L so it is the same size as a pointer.
OK mickey@ and discussed with deraadt@
22 years ago
millert
b68c09e067
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
23 years ago
espie
f851e80d96
Be thorough about NULL as __null for C++.
25 years ago
d
31570910f0
Add thread-safety to libc, so that libc_r will build (on i386 at least).
All POSIX libc api now there (to P1003.1c/D10)
(more md stuff is needed for other libc/arch/*)
(setlogin is no longer a special syscall)
Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS).
Doc some re-entrant routines
Add libc_r to intro(3)
dig() uses some libc srcs and an extra -I was needed there.
Add more md stuff to libc_r.
Update includes for the pthreads api
Update libc_r TODO
26 years ago
millert
c10d7a59ff
protos for strlcat, strlcpy
26 years ago
deraadt
04069432b8
move proto to unistd.h
27 years ago
niklas
2a0bf72166
Well, as we are heading for a release people are encouraged to rebuild their
entire trees for testing anyway, I might as well do this intrusive touching
of include files now. Added openBSD tags.
27 years ago
deraadt
47b73ff83c
initial import of NetBSD tree
29 years ago