summaryrefslogtreecommitdiff
path: root/include/string.h
AgeCommit message (Collapse)Author
2024-08-03The improbable occurred: strlcpy(3) and strlcat(3) are in POSIX-2024.Philip Guenther
memmem(3) was also added. Update #include visibility and manpages and add restrict qualifiers. "never thought I'd see this day" millert@
2024-06-23strmode takes a mode_t, not an int; prompted by Collin Funk.Otto Moerbeek
ok kettenis@ deraadt@ tb@
2017-09-05New POSIX xlocale implementation written from scratch.Ingo Schwarze
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.
2016-09-09Move the 10 (!) defintions of NULL to their own mini header file andTodd C. Miller
update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
2015-11-20POSIX says that ffs(), strcasecmp(), strncasecmp(), r?index() andTodd C. Miller
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@
2014-08-10Delete duplicate conditionalPhilip Guenther
diff from frantisek holop (minusf (at) obiit.org)
2014-06-13Add timingsafe_memcmp().Matthew Dempsky
ok deraadt, jmc, tedu
2014-01-22add explicit_bzero to libc. implementation subject to change, but startTed Unangst
the ball rolling. ok deraadt.
2013-05-13Add an implementation of memmem() -- from FreeBSD with some tweaks.Antoine Jacoutot
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@
2013-04-11Add 'restrict' per POSIX, per prodding by tedu@. (Might permit more warnings?)Philip Guenther
Tweak standards exposure of memchr (never) and strdup (POSIX-2008) Remove unnecessary tests of __BSD_VISIBLE ok millert@
2012-03-25strsignal() was added to POSIX-2008; strerror_r() was in the basePhilip Guenthe
of POSIX-2001, without the XSI qualifier. Adjust conditionals to match. ok millert@
2012-01-17Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.Philip Guenthe
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
2011-07-03As pointed out by Richard Guenther our definitionJonathan Gray
of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang). ok miod@
2011-04-06Define NULL as a void * instead of a long integer, as required by Single Unix.Miod Vallat
Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed.
2010-09-24Add timingsafe_bcmp(3) to libc, mention that it's already in theMatthew Dempsky
kernel in kern(9), and remove it from OpenSSH. ok deraadt@, djm@
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
2007-09-03add memrchr(3)Todd C. Miller
2006-01-06Adapt things to use __type_t instead of _BSD_TYPE_T_Todd C. Miller
Add new sys/_types.h header Include machine/_types.h or sys/_types.h where applicable
2005-12-13First step in include files overhaul. Use __FOO_VISIBLE (as definedTodd C. Miller
in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraadt@
2005-03-30strcasestr(3), a case-insensitive version of strstr(3). already in netbsdTheo de Raadt
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
2004-06-20add bounds check for src pointer in bcopy(3) as well as dest pointer,Anil Madhavapeddy
noticed by millert@
2003-08-01add __bounded__ attributes for userland headers; enabled with -WboundedAnil Madhavapeddy
ok deraadt@
2003-06-26backout the __bounded__ attributes for a while; requested by deraadt@Anil Madhavapeddy
2003-06-26Mark various standard library functions with the __bounded__ attribute.Anil Madhavapeddy
You must have an up-to-date gcc for this! deraadt@ ok
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-11-21add prototype for strerror_rMarco S Hyman
2002-10-25NULL is now 0L so it is the same size as a pointer.Todd C. Miller
OK mickey@ and discussed with deraadt@
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
1999-09-17Be thorough about NULL as __null for C++.Marc Espie
1998-11-20Add thread-safety to libc, so that libc_r will build (on i386 at least).David Leonard
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
1998-11-04protos for strlcat, strlcpyTodd C. Miller
1998-02-10move proto to unistd.hTheo de Raadt
1997-09-21Well, as we are heading for a release people are encouraged to rebuild theirNiklas Hallqvist
entire trees for testing anyway, I might as well do this intrusive touching of include files now. Added openBSD tags.
1995-10-18initial import of NetBSD treeTheo de Raadt