CVS Repository/ src/ include/ string.h


OpenBSD release(s):
1.34 (79 78 77 76),  1.32 (75 74 73 72 71 70 69 68 67 66 65 64 63 62),  1.31 (61),  1.30 (60 59),  1.29 (58 57),  1.28 (56),  1.27 (55),  1.26 (54),  1.24 (53 52),  1.23 (51),  1.22 (50),  1.20 (49),  1.19 (48),  1.18 (47 46 45 44 43),  1.17 (42 41 40 39),  1.15 (38),  1.14 (37 36),  1.13 (35 34),  1.9 (33),  1.7 (32 31),  1.6 (30 29 28 27 26),  1.5 (25),  1.3 (24 23),  1.2 (22),  1.1.1.1 (21 20), 
Tags:
1.1.1.1 (netbsd_1_1), 
revision 1.34/ (Download) - annotate - Sat, 03 Aug 2024 20:13:23 UTC by guenther
OpenBSD release(s): 79 78 77 76
Changes since 1.33: +9 -6 (diff)
The improbable occurred: strlcpy(3) and strlcat(3) are in POSIX-2024.
memmem(3) was also added.  Update #include visibility and manpages
and add restrict qualifiers.

"never thought I'd see this day" millert@

revision 1.33/ (Download) - annotate - Sun, 23 Jun 2024 07:08:26 UTC by otto
Changes since 1.32: +3 -3 (diff)
strmode takes a mode_t, not an int; prompted by Collin Funk.
ok kettenis@ deraadt@ tb@

revision 1.32/ (Download) - annotate - Tue, 05 Sep 2017 03:16:13 UTC by schwarze
OpenBSD release(s): 75 74 73 72 71 70 69 68 67 66 65 64 63 62
Changes since 1.31: +12 -1 (diff)
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.

revision 1.31/ (Download) - annotate - Fri, 09 Sep 2016 18:12:37 UTC by millert
OpenBSD release(s): 61
Changes since 1.30: +2 -11 (diff)
Move the 10 (!) defintions of NULL to their own mini header file and
update the NULL definition for C++11.  OK deraadt@ guenther@ kettenis@

revision 1.30/ (Download) - annotate - Fri, 20 Nov 2015 23:40:32 UTC by millert
OpenBSD release(s): 60 59
Changes since 1.29: +9 -15 (diff)
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@

revision 1.29/ (Download) - annotate - Sun, 10 Aug 2014 02:49:24 UTC by guenther
OpenBSD release(s): 58 57
Changes since 1.28: +1 -4 (diff)
Delete duplicate conditional

diff from frantisek holop (minusf (at) obiit.org)

revision 1.28/ (Download) - annotate - Fri, 13 Jun 2014 02:12:17 UTC by matthew
OpenBSD release(s): 56
Changes since 1.27: +2 -1 (diff)
Add timingsafe_memcmp().

ok deraadt, jmc, tedu

revision 1.27/ (Download) - annotate - Wed, 22 Jan 2014 21:06:45 UTC by tedu
OpenBSD release(s): 55
Changes since 1.26: +3 -1 (diff)
add explicit_bzero to libc. implementation subject to change, but start
the ball rolling. ok deraadt.

revision 1.26/ (Download) - annotate - Mon, 13 May 2013 10:37:02 UTC by ajacoutot
OpenBSD release(s): 54
Changes since 1.25: +2 -1 (diff)
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@

revision 1.25/ (Download) - annotate - Thu, 11 Apr 2013 03:08:47 UTC by guenther
Changes since 1.24: +21 -18 (diff)
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@

revision 1.24/ (Download) - annotate - Sun, 25 Mar 2012 20:04:18 UTC by guenther
OpenBSD release(s): 53 52
Changes since 1.23: +6 -3 (diff)
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@

revision 1.23/ (Download) - annotate - Tue, 17 Jan 2012 02:48:01 UTC by guenther
OpenBSD release(s): 51
Changes since 1.22: +3 -1 (diff)
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

revision 1.22/ (Download) - annotate - Sun, 03 Jul 2011 18:51:01 UTC by jsg
OpenBSD release(s): 50
Changes since 1.21: +3 -1 (diff)
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@

revision 1.21/ (Download) - annotate - Wed, 06 Apr 2011 11:39:42 UTC by miod
Changes since 1.20: +2 -2 (diff)
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.

revision 1.20/ (Download) - annotate - Fri, 24 Sep 2010 13:33:00 UTC by matthew
OpenBSD release(s): 49
Changes since 1.19: +2 -1 (diff)
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@

revision 1.19/ (Download) - annotate - Tue, 18 May 2010 22:24:55 UTC by tedu
OpenBSD release(s): 48
Changes since 1.18: +6 -1 (diff)
add posix_madvise, posix_memalign, strndup, and strnlen.  mostly from
brad and millert, with hints from guenther, jmc, and otto I think.
ok previous.

revision 1.18/ (Download) - annotate - Mon, 03 Sep 2007 14:36:40 UTC by millert
OpenBSD release(s): 47 46 45 44 43
Changes since 1.17: +2 -1 (diff)
add memrchr(3)

revision 1.17/ (Download) - annotate - Fri, 06 Jan 2006 18:53:04 UTC by millert
OpenBSD release(s): 42 41 40 39
Changes since 1.16: +5 -5 (diff)
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

revision 1.16/ (Download) - annotate - Tue, 13 Dec 2005 00:35:22 UTC by millert
Changes since 1.15: +18 -10 (diff)
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@

revision 1.15/ (Download) - annotate - Wed, 30 Mar 2005 03:04:16 UTC by deraadt
OpenBSD release(s): 38
Changes since 1.14: +2 -1 (diff)
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

revision 1.14/ (Download) - annotate - Sun, 20 Jun 2004 17:47:07 UTC by avsm
OpenBSD release(s): 37 36
Changes since 1.13: +2 -1 (diff)
add bounds check for src pointer in bcopy(3) as well as dest pointer,
noticed by millert@

revision 1.13/ (Download) - annotate - Fri, 01 Aug 2003 17:38:33 UTC by avsm
OpenBSD release(s): 35 34
Changes since 1.12: +27 -13 (diff)
add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@

revision 1.12/ (Download) - annotate - Thu, 26 Jun 2003 19:34:17 UTC by avsm
Changes since 1.11: +12 -26 (diff)
backout the __bounded__ attributes for a while; requested by deraadt@

revision 1.11/ (Download) - annotate - Thu, 26 Jun 2003 18:35:13 UTC by avsm
Changes since 1.10: +27 -13 (diff)
Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this!
deraadt@ ok

revision 1.10/ (Download) - annotate - Mon, 02 Jun 2003 19:34:12 UTC by millert
Changes since 1.9: +2 -6 (diff)
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

revision 1.9/ (Download) - annotate - Thu, 21 Nov 2002 20:42:39 UTC by marc
OpenBSD release(s): 33
Changes since 1.8: +2 -1 (diff)
add prototype for strerror_r

revision 1.8/ (Download) - annotate - Fri, 25 Oct 2002 21:55:28 UTC by millert
Changes since 1.7: +2 -2 (diff)
NULL is now 0L so it is the same size as a pointer.
OK mickey@ and discussed with deraadt@

revision 1.7/ (Download) - annotate - Sat, 16 Feb 2002 21:27:17 UTC by millert
OpenBSD release(s): 32 31
Changes since 1.6: +39 -39 (diff)
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.

revision 1.6/ (Download) - annotate - Fri, 17 Sep 1999 13:13:46 UTC by espie
OpenBSD release(s): 30 29 28 27 26
Changes since 1.5: +5 -1 (diff)
Be thorough about NULL as __null for C++.

revision 1.5/ (Download) - annotate - Fri, 20 Nov 1998 11:18:26 UTC by d
OpenBSD release(s): 25
Changes since 1.4: +2 -1 (diff)
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

revision 1.4/ (Download) - annotate - Wed, 04 Nov 1998 19:35:48 UTC by millert
Changes since 1.3: +3 -1 (diff)
protos for strlcat, strlcpy

revision 1.3/ (Download) - annotate - Tue, 10 Feb 1998 02:19:46 UTC by deraadt
OpenBSD release(s): 24 23
Changes since 1.2: +1 -2 (diff)
move proto to unistd.h

revision 1.2/ (Download) - annotate - Sun, 21 Sep 1997 10:45:54 UTC by niklas
OpenBSD release(s): 22
Changes since 1.1: +1 -0 (diff)
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.

revision 1.1/ (Download) - annotate - Wed, 18 Oct 1995 08:41:14 UTC by deraadt
Branch point for: 1.1.1.1
Initial revision

revision 1.1.1.1/ (Download) - annotate - Wed, 18 Oct 1995 08:41:14 UTC by deraadt
OpenBSD release(s): 21 20
Tags: netbsd_1_1
Changes since 1.1: None
initial import of NetBSD tree