Home | History | Annotate | only in /src/common/lib/libc/string
History log of /src/common/lib/libc/string
RevisionDateAuthorComments
 1.10 29-Jan-2020  ad Some boot blocks too big now, only compare in big chunks if !_STANDALONE.
 1.9 27-Jan-2020  ad Drop the alignment check if __NO_STRICT_ALIGNMENT (x86, m68k, vax).
 1.8 27-Jan-2020  ad bcmp() / memcmp(): compare in uintptr_t sized chunks when it's easy to.
 1.7 09-Mar-2012  christos branches: 1.7.34; 1.7.38;
Casts and type changes to fix portability issues.
- int -> size_t
- adjust width of RHS of shift
- adjust widths of types
 1.6 25-Apr-2009  skrll branches: 1.6.6;
Only include <assert.h> and <string.h> if !_KERNEL && !_STANDALONE
 1.5 19-Mar-2009  he Actually... We need libkern.h also under _STANDALONE, so that
_DIAGASSERT gets defined. Fixes the mvmeppc libsa build.
 1.4 18-Mar-2009  tsutsui - remove bcmp(9), bcopy(9), and bzero(9) from libkern since <sys/systm.h> has
macro which replace them with mem*() functions in #ifdef _KERNEL as noted
in man pages
- move declarations of bcopy(3) and bzero(3) into <lib/libsa/stand.h>
since they are still in libsa for some MD standalone sources
(I guess all bcmp(3) in standalone sources have been replaced with memcmp(3)
but they should be replaced with memcmp() anyway)
 1.3 17-Mar-2009  he Add local declarations of bcmp() and bzero() because libkern.h no longer
provides those declarations.

It's possible that these can be removed later when we find out whether
these functions are actually needed in the kernel, but meanwhile, this
allows alpha, hp700 and the powerpc ports (who all build these as part
of libkern) to complete their builds.
 1.2 04-Jun-2007  christos branches: 1.2.20;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.20.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.6.1 17-Apr-2012  yamt sync with head
 1.7.38.1 29-Feb-2020  ad Sync with head.
 1.7.34.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.34.2 21-Apr-2020  martin Sync with HEAD
 1.7.34.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13 12-Feb-2018  martin branches: 1.13.4;
Complete previous by complteley removing the _DIAGASSERT from memmove -
the accidental left over from previous fired on all legitimate calls
and caused PR bin/52986 and PR lib/52987.
 1.12 04-Feb-2018  mrg updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.11 16-Apr-2014  joerg Undef possible macro versions of memcpy and friends for kernel builds
too. libkern sometimes defines them to the builtins.
 1.10 14-Apr-2014  joerg Using bcopy/memcpy with NULL arguments is valid as long as the size is
also 0.
 1.9 18-Mar-2009  tsutsui branches: 1.9.6; 1.9.12; 1.9.24;
- remove bcmp(9), bcopy(9), and bzero(9) from libkern since <sys/systm.h> has
macro which replace them with mem*() functions in #ifdef _KERNEL as noted
in man pages
- move declarations of bcopy(3) and bzero(3) into <lib/libsa/stand.h>
since they are still in libsa for some MD standalone sources
(I guess all bcmp(3) in standalone sources have been replaced with memcmp(3)
but they should be replaced with memcmp() anyway)
 1.8 26-Mar-2008  apb branches: 1.8.10;
Add /* __OPTIMIZE_SIZE__ */ comments on relevant #else and #endif lines.
Also change some #ifdef to #if defined() for consistency.
 1.7 25-Mar-2008  christos bcopy does not return ptr.
 1.6 25-Mar-2008  christos fix #ifdefs for BCOPY
 1.5 25-Mar-2008  christos add bcopy and bzero for the benefit of loadfile.
 1.4 25-Mar-2008  christos add __OPTIMIZE_SIZE__ versions.
 1.3 04-Jun-2007  christos handle fortify, ansify.
 1.2 05-Feb-2006  ross Don't do DIAGASSERT against NULL if _KERNEL This puts us back to
kernel behavior before src/common where 0 was a valid dest addr.

This should fix the macppc (and other OEA ppc) silent-death-on-DIAGNOSTIC
issue, and possibly other DIAGNOSTIC failures.

XXX it might be worth thinking about an API where 0 is allowed in
documented cases and not allowed otherwise.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.8.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.24.1 10-Aug-2014  tls Rebase.
 1.9.12.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.13.4.1 21-Apr-2020  martin Sync with HEAD
 1.1 20-Dec-2005  christos branches: 1.1.94;
Merge libkern + libc common files. As requested by core.
 1.1.94.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.1.94.1 21-Apr-2020  martin Sync with HEAD
 1.2 14-Dec-2009  matt branches: 1.2.48;
Merge from matt-nb5-mips64
 1.1 17-Aug-2009  matt branches: 1.1.2;
file bzero2.c was initially added on branch matt-nb5-mips64.
 1.1.2.1 17-Aug-2009  matt Add word-load-store optimized version of memset/bzero. On platforms with
64bit registers they can be as efficient as assembly coded version.
 1.2.48.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.48.1 21-Apr-2020  martin Sync with HEAD
 1.2 24-Jun-2013  riastradh Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
 1.1 30-Aug-2012  drochner branches: 1.1.2; 1.1.4;
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.
 1.1.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 30-Aug-2012  yamt file consttime_bcmp.c was added on branch yamt-pagecache on 2012-10-30 18:46:14 +0000
 1.1.2.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 18-Mar-2015  riastradh branches: 1.6.16;
Switch to the suggested constant-time result conversion.

Not hard to find CPU/compiler combinations with branches for `!res'.

While here, make everything unsigned for good measure.
 1.5 24-Jun-2014  drochner branches: 1.5.4;
add a public domain notice
 1.4 28-Aug-2013  riastradh branches: 1.4.2; 1.4.4;
Comment on possible data-dependent branch in `!res'.
 1.3 28-Aug-2013  riastradh Publish explicit_memset and consttime_memequal in userland libc.

Remove the double-underscore from the userland versions, and do the
weak alias dance instead, now that these are public parts of libc.

As discussed on tech-userlevel:

https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
(option 3)
 1.2 28-Aug-2013  riastradh Fix sense of consttime_memequal and update all callers.

Now it returns true (nonzero) to mean equal and false (zero) to mean
inequal, as the name suggests.

As promised on tech-userlevel back in June:

https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
 1.1 24-Jun-2013  riastradh Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
 1.4.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.4.1 28-Aug-2013  yamt file consttime_memequal.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.5.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 24-Jun-2014  tls file consttime_memequal.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.6.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.6.16.1 21-Apr-2020  martin Sync with HEAD
 1.2 24-Jun-2013  riastradh Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
 1.1 30-Aug-2012  drochner branches: 1.1.2; 1.1.4;
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.
 1.1.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 30-Aug-2012  yamt file explicit_bzero.c was added on branch yamt-pagecache on 2012-10-30 18:46:14 +0000
 1.1.2.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 02-Nov-2024  riastradh memset_explicit(3): Add C23 alias for explicit_memset.

PR standards/58607: C23: <string.h> memset_explicit
 1.4 24-Jun-2014  drochner branches: 1.4.4; 1.4.26; 1.4.46;
add a public domain notice
 1.3 28-Aug-2013  riastradh branches: 1.3.2; 1.3.4;
Publish explicit_memset and consttime_memequal in userland libc.

Remove the double-underscore from the userland versions, and do the
weak alias dance instead, now that these are public parts of libc.

As discussed on tech-userlevel:

https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
(option 3)
 1.2 28-Aug-2013  riastradh Make explicit_memset match memset's return value.
 1.1 24-Jun-2013  riastradh Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
 1.3.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1 28-Aug-2013  yamt file explicit_memset.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.3.2.1 10-Aug-2014  tls Rebase.
 1.4.46.1 02-Aug-2025  perseant Sync with HEAD
 1.4.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.26.1 21-Apr-2020  martin Sync with HEAD
 1.4.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 24-Jun-2014  tls file explicit_memset.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.4 07-Aug-2011  mrg branches: 1.4.44;
add a weak alias to __ffssi2, needed for hppa gcc 4.5.
 1.3 02-Nov-2007  christos use the ffs32 from bitops.h which is faster
 1.2 04-Jun-2007  christos branches: 1.2.4;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.4.1 06-Nov-2007  matt sync with HEAD
 1.4.44.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.44.1 21-Apr-2020  martin Sync with HEAD
 1.2 07-Nov-2024  christos branches: 1.2.4;
pass lint
 1.1 01-Nov-2024  riastradh strings.h: Spruce up for POSIX 2024.

1. Add ffsl, ffsll.
2. Hide bcmp, bcopy, bzero, index, rindex for POSIX>=2024.
3. Expose ffs only for NetBSD or POSIX>=2008 with XSI option.
4. Hide popcount* NetBSD extensions for any POSIX.
5. Sprinkle __constfunc on ffs*.

Add tests for ffs/ffsl/ffsll in tests/include/sys/t_bitops next to
ffs32/ffs64 for convenience.

XXX Still missing strcasecmp_l, strncasecmp_l, and locale_t.

PR lib/58802: missing ffsl(), ffsll() functions from POSIX 2024
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 07-Nov-2024  perseant file ffsl.c was added on branch perseant-exfatfs on 2025-08-02 05:18:34 +0000
 1.1 01-Nov-2024  riastradh branches: 1.1.4;
strings.h: Spruce up for POSIX 2024.

1. Add ffsl, ffsll.
2. Hide bcmp, bcopy, bzero, index, rindex for POSIX>=2024.
3. Expose ffs only for NetBSD or POSIX>=2008 with XSI option.
4. Hide popcount* NetBSD extensions for any POSIX.
5. Sprinkle __constfunc on ffs*.

Add tests for ffs/ffsl/ffsll in tests/include/sys/t_bitops next to
ffs32/ffs64 for convenience.

XXX Still missing strcasecmp_l, strncasecmp_l, and locale_t.

PR lib/58802: missing ffsl(), ffsll() functions from POSIX 2024
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 01-Nov-2024  perseant file ffsll.c was added on branch perseant-exfatfs on 2025-08-02 05:18:34 +0000
 1.4 04-Feb-2018  mrg branches: 1.4.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.3 08-Jan-2008  martin When passing char (or unsigned char) arguments as int, assign them to a
temporary char (resp. unsigned char) before comparing, to force truncation
to the proper domain. This makes the coresponding regression tests succeed.
 1.2 04-Jun-2007  christos branches: 1.2.4;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.4.1 23-Mar-2008  matt sync with HEAD
 1.4.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.4.1 21-Apr-2020  martin Sync with HEAD
 1.8 29-Jan-2020  ad Some boot blocks too big now, only compare in big chunks if !_STANDALONE.
 1.7 27-Jan-2020  ad Drop the alignment check if __NO_STRICT_ALIGNMENT (x86, m68k, vax).
 1.6 27-Jan-2020  ad bcmp() / memcmp(): compare in uintptr_t sized chunks when it's easy to.
 1.5 04-Feb-2018  mrg branches: 1.5.4; 1.5.8;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.4 02-Dec-2013  joerg Improve EABI handling of string functions. Most importantly, fix
__aeabi_memset, which has the arguments in the wrong order.
 1.3 08-Nov-2011  joerg branches: 1.3.6;
libkern.h maps memcmp, memset and strcpy to the compiler builtins on
some platforms, so make sure to #undef them first.
 1.2 04-Jun-2007  christos branches: 1.2.34;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.34.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.34.1 10-Nov-2011  yamt sync with head
 1.3.6.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.8.1 29-Feb-2020  ad Sync with head.
 1.5.4.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.5.4.2 21-Apr-2020  martin Sync with HEAD
 1.5.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 02-Dec-2013  joerg branches: 1.2.26;
Improve EABI handling of string functions. Most importantly, fix
__aeabi_memset, which has the arguments in the wrong order.
 1.1 20-Dec-2005  christos branches: 1.1.50; 1.1.56;
Merge libkern + libc common files. As requested by core.
 1.1.56.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.50.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.26.1 21-Apr-2020  martin Sync with HEAD
 1.6 14-Dec-2024  riastradh memmem(3): Avoid undefined behaviour in shift.

PR lib/58906: memmem.c: sync with musl upstream that fixes UB on
signed overflow
 1.5 14-Dec-2024  riastradh memmem(3): Nix trailing whitespace.

No functional change intended.

Preparation for:

PR lib/58906: memmem.c: sync with musl upstream that fixes UB on signed overflow
 1.4 16-May-2021  rillig branches: 1.4.10;
memmem: remove unreachable return statement
 1.3 15-Oct-2018  christos branches: 1.3.2; 1.3.12;
use postincrement, like the patch
XXX: pullup-8
 1.2 15-Oct-2018  christos Avoid out-of-bounds reads
https://www.openwall.com/lists/musl/2017/06/29/6
XXX: pullup-8
 1.1 08-Jul-2018  christos branches: 1.1.2;
switch to FreeBSD's memmem (faster)
 1.1.2.3 20-Oct-2018  pgoyette Sync with head
 1.1.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.1 08-Jul-2018  pgoyette file memmem.c was added on branch pgoyette-compat on 2018-07-28 04:32:57 +0000
 1.3.12.1 31-May-2021  cjep sync with head
 1.3.2.4 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.2.3 21-Apr-2020  martin Sync with HEAD
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 15-Oct-2018  christos file memmem.c was added on branch phil-wifi on 2019-06-10 21:41:07 +0000
 1.4.10.1 02-Aug-2025  perseant Sync with HEAD
 1.2 02-Dec-2013  joerg branches: 1.2.26;
Improve EABI handling of string functions. Most importantly, fix
__aeabi_memset, which has the arguments in the wrong order.
 1.1 20-Dec-2005  christos branches: 1.1.50; 1.1.56;
Merge libkern + libc common files. As requested by core.
 1.1.56.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.50.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.26.1 21-Apr-2020  martin Sync with HEAD
 1.12 30-Mar-2019  jmcneill Fix typo: __aebi_memset -> __aeabi_memset
 1.11 06-Feb-2018  mrg branches: 1.11.4;
- remove two more _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
 1.10 02-Dec-2013  joerg Improve EABI handling of string functions. Most importantly, fix
__aeabi_memset, which has the arguments in the wrong order.
 1.9 08-Nov-2011  joerg branches: 1.9.6;
libkern.h maps memcmp, memset and strcpy to the compiler builtins on
some platforms, so make sure to #undef them first.
 1.8 18-Mar-2009  tsutsui branches: 1.8.6;
- remove bcmp(9), bcopy(9), and bzero(9) from libkern since <sys/systm.h> has
macro which replace them with mem*() functions in #ifdef _KERNEL as noted
in man pages
- move declarations of bcopy(3) and bzero(3) into <lib/libsa/stand.h>
since they are still in libsa for some MD standalone sources
(I guess all bcmp(3) in standalone sources have been replaced with memcmp(3)
but they should be replaced with memcmp() anyway)
 1.7 17-Mar-2009  he Add local declarations of bcmp() and bzero() because libkern.h no longer
provides those declarations.

It's possible that these can be removed later when we find out whether
these functions are actually needed in the kernel, but meanwhile, this
allows alpha, hp700 and the powerpc ports (who all build these as part
of libkern) to complete their builds.
 1.6 29-Mar-2008  he branches: 1.6.10;
Do like the non-__OPTIMIZE_SIZE__ variant, and compile memset() unless
BZERO is defined, instead of requiring MEMSET to be defined.

Avoids violating the principle of least astonishment, and also fixes
the build of stand/ and kernels for (at least) alpha.
 1.5 29-Mar-2008  he Make the size-optimized memset() actually conform to the man page
by returning the first arg.
 1.4 26-Mar-2008  apb Add /* __OPTIMIZE_SIZE__ */ comments on relevant #else and #endif lines.
Also change some #ifdef to #if defined() for consistency.
 1.3 25-Mar-2008  christos add bcopy and bzero for the benefit of loadfile.
 1.2 04-Jun-2007  christos handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.6.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.6.1 10-Nov-2011  yamt sync with head
 1.9.6.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.4.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.11.4.2 21-Apr-2020  martin Sync with HEAD
 1.11.4.1 10-Jun-2019  christos Sync with HEAD
 1.11 15-Jan-2022  andvar fix typos in comments.
 1.10 19-Apr-2021  simonb Add CVS ID line.
 1.9 17-Apr-2021  mrg avoid redefinition warning for __OPTIMIZE_SIZE__.
 1.8 17-Apr-2021  simonb Use __register_t instead of uregister_t - this is available to all ports
and both userland and kernel.
 1.7 17-Apr-2021  simonb Cast the fill value to unsigned char so that the "fill" value used for
full-word fills isn't garbage.
 1.6 17-Apr-2021  simonb Disable the larger/faster code path. While the optimised code path was
indeed quicker, it nonetheless failed to actually fill all the requested
memory with the specified value much of the time if a non-aligned start
address was used.
 1.5 02-Mar-2012  apb branches: 1.5.34;
remove trailing white space
 1.4 02-Mar-2012  apb Change CTASSERT to __CTASSERT (the spelling used in <sys/cdefs.h>),
include <sys/cdefs.h> so that it will be defined,
and move it to a better place.

The previous CTASSERT would never have been used because
of the ifdef. If it had been used, it would have had
unwanted effects from being just after the "static inline"
that appears when BZERO is defined.

Also move the __RCSID to a more conventional location.
 1.3 08-Nov-2011  joerg libkern.h maps memcmp, memset and strcpy to the compiler builtins on
some platforms, so make sure to #undef them first.
 1.2 14-Dec-2009  matt branches: 1.2.6;
Merge from matt-nb5-mips64
 1.1 17-Aug-2009  matt branches: 1.1.2;
file memset2.c was initially added on branch matt-nb5-mips64.
 1.1.2.3 23-Aug-2009  matt CTASSERT only defined for kernel enviornments.
 1.1.2.2 23-Aug-2009  matt Add a unit test to this file. Fix two bugs.
 1.1.2.1 17-Aug-2009  matt Add word-load-store optimized version of memset/bzero. On platforms with
64bit registers they can be as efficient as assembly coded version.
 1.2.6.2 17-Apr-2012  yamt sync with head
 1.2.6.1 10-Nov-2011  yamt sync with head
 1.5.34.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.5.34.1 21-Apr-2020  martin Sync with HEAD
 1.5 29-May-2015  matt branches: 1.5.16;
Don't compile if there is a macro of the same name.
 1.4 21-Aug-2011  dholland branches: 1.4.4;
Requires stdint.h.
 1.3 21-Jul-2009  drochner branches: 1.3.2;
remove stray semicolons, makes lint happy and lets the libc build proceed
 1.2 21-Jul-2009  joerg Include limits.h.
 1.1 21-Jul-2009  joerg 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.
 1.3.2.2 23-Jul-2009  jym Sync with HEAD.
 1.3.2.1 21-Jul-2009  jym file popcount32.c was added on branch jym-xensuspend on 2009-07-23 23:31:35 +0000
 1.4.4.2 27-Dec-2011  matt Add popcount32 and popcount64 for flash/nand
 1.4.4.1 21-Aug-2011  matt file popcount32.c was added on branch matt-nb5-mips64 on 2011-12-27 19:20:59 +0000
 1.5.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.5.16.1 21-Apr-2020  martin Sync with HEAD
 1.8 29-May-2015  matt branches: 1.8.16;
Don't compile if there is a macro of the same name.
 1.7 09-Mar-2012  christos Casts and type changes to fix portability issues.
- int -> size_t
- adjust width of RHS of shift
- adjust widths of types
 1.6 21-Aug-2011  dholland branches: 1.6.2; 1.6.4;
Requires stdint.h.
 1.5 05-Aug-2009  joerg Fix a comment to not be self-referencing.
 1.4 21-Jul-2009  drochner branches: 1.4.2;
remove stray semicolons, makes lint happy and lets the libc build proceed
 1.3 21-Jul-2009  joerg Make the constant u_longlong too, lint is just too stupid...
 1.2 21-Jul-2009  joerg Add explicit casts to make lint happy.
 1.1 21-Jul-2009  joerg 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.
 1.4.2.2 23-Jul-2009  jym Sync with HEAD.
 1.4.2.1 21-Jul-2009  jym file popcount64.c was added on branch jym-xensuspend on 2009-07-23 23:31:35 +0000
 1.6.4.2 27-Dec-2011  matt Add popcount32 and popcount64 for flash/nand
 1.6.4.1 21-Aug-2011  matt file popcount64.c was added on branch matt-nb5-mips64 on 2011-12-27 19:20:59 +0000
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.8.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.8.16.1 21-Apr-2020  martin Sync with HEAD
 1.3 11-Aug-2018  christos Add nbotool stuff.
 1.2 04-Jun-2007  christos branches: 1.2.76; 1.2.78;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.78.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.78.2 21-Apr-2020  martin Sync with HEAD
 1.2.78.1 10-Jun-2019  christos Sync with HEAD
 1.2.76.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 07-Apr-2020  skrll Fix KASAN build on aarch64
 1.3 04-Feb-2018  mrg branches: 1.3.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.2 04-Jun-2007  christos handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.4.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.4.2 21-Apr-2020  martin Sync with HEAD
 1.3.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7 07-Apr-2020  skrll Fix KASAN build on aarch64
 1.6 04-Feb-2018  mrg branches: 1.6.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.5 31-Aug-2011  plunky NULL does not need a cast
 1.4 17-Jul-2009  dsl Change all archs so that strchr.[cS] and strrchr.[cS] exist and generate
duplicate symbols for index() and rindex().
 1.3 08-Jan-2008  martin branches: 1.3.12;
When passing char (or unsigned char) arguments as int, assign them to a
temporary char (resp. unsigned char) before comparing, to force truncation
to the proper domain. This makes the coresponding regression tests succeed.
 1.2 04-Jun-2007  christos branches: 1.2.4;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.4.1 23-Mar-2008  matt sync with HEAD
 1.3.12.1 23-Jul-2009  jym Sync with HEAD.
 1.6.4.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.6.4.2 21-Apr-2020  martin Sync with HEAD
 1.6.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 12-Oct-2016  christos branches: 1.1.2; 1.1.16;
Add strchrnul
 1.1.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.1.16.1 21-Apr-2020  martin Sync with HEAD
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 12-Oct-2016  pgoyette file strchrnul.c was added on branch pgoyette-localcount on 2016-11-04 14:42:22 +0000
 1.4 04-Feb-2018  mrg branches: 1.4.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.3 01-Jul-2013  joerg Don't pick up strcmp as macro from libkern.h.
 1.2 04-Jun-2007  christos branches: 1.2.34; 1.2.40;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.40.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.34.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.4.1 21-Apr-2020  martin Sync with HEAD
 1.4 04-Feb-2018  mrg branches: 1.4.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.3 08-Nov-2011  joerg libkern.h maps memcmp, memset and strcpy to the compiler builtins on
some platforms, so make sure to #undef them first.
 1.2 04-Jun-2007  christos branches: 1.2.34;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.34.1 10-Nov-2011  yamt sync with head
 1.4.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.4.1 21-Apr-2020  martin Sync with HEAD
 1.2 04-Feb-2018  mrg branches: 1.2.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.1 19-Jul-2014  lneto branches: 1.1.2; 1.1.6;
lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
 1.1.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 19-Jul-2014  tls file strcspn.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 19-Jul-2014  tls file strcspn.c was added on branch tls-earlyentropy on 2014-08-10 06:47:06 +0000
 1.2.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.4.1 21-Apr-2020  martin Sync with HEAD
 1.5 01-Nov-2024  riastradh string.h: Fix various symbol visibility issues.

1. Order declarations according to POSIX 2024 to make this easier to
review side-by-side with the spec.
2. Fix visibility of memccpy: XSI-only, not POSIX in general; require
_XOPEN_SOURCE, not just _POSIX_C_SOURCE.
3. Omit redundant _XOPEN_SOURCE test around stpcpy/stpncpy.
4. Hide strdup in POSIX 2001. Not POSIX (without XSI) until 2008.
5. Hide strerror_r until POSIX 2001. Can't find evidence of it in
any earlier POSIX or X/Open. (Not 100% sure on this one, maybe
someone can double-check my research.)
6. Add restrict to strlcat/strlcpy.
7. Omit redundant _XOPEN_SOURCE test around strndup and strnlen.
8. Hide strtok_r until POSIX 2001. Can't find evidence of it in
any earlier POSIX or X/Open. (Not 100% sure on this one, maybe
someone can double-check my research.)

Carry the restrict qualifiers on strlcat/strlcpy to libkern too.

Main reference:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/string.h.html

PR standards/58804: string.h: wrong visibility for memccpy
 1.4 23-Jan-2013  matt branches: 1.4.32; 1.4.52;
Add a (unused) variant of strlcat that uses strnlen and strlcpy to do the work.
 1.3 04-Jun-2007  christos branches: 1.3.34; 1.3.40;
handle fortify, ansify.
 1.2 30-Mar-2006  christos remove bogus _LIBC defines. broke lint.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.40.1 25-Feb-2013  tls resync with head
 1.3.34.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.52.1 02-Aug-2025  perseant Sync with HEAD
 1.4.32.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.32.1 21-Apr-2020  martin Sync with HEAD
 1.4 01-Nov-2024  riastradh string.h: Fix various symbol visibility issues.

1. Order declarations according to POSIX 2024 to make this easier to
review side-by-side with the spec.
2. Fix visibility of memccpy: XSI-only, not POSIX in general; require
_XOPEN_SOURCE, not just _POSIX_C_SOURCE.
3. Omit redundant _XOPEN_SOURCE test around stpcpy/stpncpy.
4. Hide strdup in POSIX 2001. Not POSIX (without XSI) until 2008.
5. Hide strerror_r until POSIX 2001. Can't find evidence of it in
any earlier POSIX or X/Open. (Not 100% sure on this one, maybe
someone can double-check my research.)
6. Add restrict to strlcat/strlcpy.
7. Omit redundant _XOPEN_SOURCE test around strndup and strnlen.
8. Hide strtok_r until POSIX 2001. Can't find evidence of it in
any earlier POSIX or X/Open. (Not 100% sure on this one, maybe
someone can double-check my research.)

Carry the restrict qualifiers on strlcat/strlcpy to libkern too.

Main reference:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/string.h.html

PR standards/58804: string.h: wrong visibility for memccpy
 1.3 04-Jun-2007  christos branches: 1.3.78; 1.3.98;
handle fortify, ansify.
 1.2 30-Mar-2006  christos remove bogus _LIBC defines. broke lint.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.98.1 02-Aug-2025  perseant Sync with HEAD
 1.3.78.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.78.1 21-Apr-2020  martin Sync with HEAD
 1.3 06-Feb-2018  mrg branches: 1.3.4;
- remove two more _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
 1.2 04-Jun-2007  christos handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.4.1 21-Apr-2020  martin Sync with HEAD
 1.3 16-Aug-2018  christos toolify.
 1.2 04-Jun-2007  christos branches: 1.2.76; 1.2.78;
handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.2.78.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.78.2 21-Apr-2020  martin Sync with HEAD
 1.2.78.1 10-Jun-2019  christos Sync with HEAD
 1.2.76.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3 04-Feb-2018  mrg branches: 1.3.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.2 27-Dec-2013  christos branches: 1.2.4; 1.2.8;
make it kernel friendly.
 1.1 27-Dec-2013  christos kernel needs it now too.
 1.2.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 27-Dec-2013  tls file strncat.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 27-Dec-2013  yamt file strncat.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.3.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.4.1 21-Apr-2020  martin Sync with HEAD
 1.3 04-Feb-2018  mrg branches: 1.3.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.2 04-Jun-2007  christos handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.4.1 21-Apr-2020  martin Sync with HEAD
 1.4 04-Feb-2018  mrg branches: 1.4.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.3 04-Jun-2007  christos handle fortify, ansify.
 1.2 03-Jun-2007  christos Make these work with _FORTIFY_SOURCE, by overriding the fortified definitions
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.4.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.4.1 21-Apr-2020  martin Sync with HEAD
 1.2 09-Jan-2014  apb branches: 1.2.26;
Make strnlen implementation usable from src/tools/compat.
 1.1 01-Sep-2011  jym branches: 1.1.2; 1.1.8;
Make strnlen(3) accessible in kernel. ok christos@.
 1.1.8.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.26.1 21-Apr-2020  martin Sync with HEAD
 1.3 20-Jan-2024  christos Add __UNCONST
 1.2 04-Feb-2018  mrg branches: 1.2.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.1 19-Jul-2014  lneto branches: 1.1.2; 1.1.6;
lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
 1.1.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 19-Jul-2014  tls file strpbrk.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 19-Jul-2014  tls file strpbrk.c was added on branch tls-earlyentropy on 2014-08-10 06:47:06 +0000
 1.2.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.4.1 21-Apr-2020  martin Sync with HEAD
 1.7 07-Apr-2020  skrll Fix KASAN build on aarch64
 1.6 04-Feb-2018  mrg branches: 1.6.4;
updates for GCC 6.4:

- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. (probably more to come,
the set between x86 and sparc us disjoint.)

- port libsanitizer's GetPcSpBp() to sparc, sparc64 and amd64.
 1.5 17-Jul-2009  dsl Change all archs so that strchr.[cS] and strrchr.[cS] exist and generate
duplicate symbols for index() and rindex().
 1.4 08-Jan-2008  martin branches: 1.4.12;
When passing char (or unsigned char) arguments as int, assign them to a
temporary char (resp. unsigned char) before comparing, to force truncation
to the proper domain. This makes the coresponding regression tests succeed.
 1.3 04-Jun-2007  christos branches: 1.3.4;
handle fortify, ansify.
 1.2 13-Mar-2006  martin Enforce argument domain by assigning to a char variable and searching
for that. This way we pass the lib/libc/string/strrchr regression tests.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.4.1 23-Mar-2008  matt sync with HEAD
 1.4.12.1 23-Jul-2009  jym Sync with HEAD.
 1.6.4.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.6.4.2 21-Apr-2020  martin Sync with HEAD
 1.6.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 04-Jun-2007  christos branches: 1.3.78;
handle fortify, ansify.
 1.2 19-Feb-2007  chs don't do the weak symbol thing in kernel context.
 1.1 13-Nov-2006  dyoung branches: 1.1.2; 1.1.4;
Add strsep(3) to libkern.

To avoid code duplication, move strsep.c to the kernel/userland
common files.

Soon I will commit source-address selection (options IPSELSRC).
It will use strsep(3).
 1.1.4.1 10-Mar-2007  bouyer Pull up following revision(s) (requested by chs in ticket #504):
common/lib/libc/string/strsep.c: revision 1.2
don't do the weak symbol thing in kernel context.
 1.1.2.2 13-Nov-2006  dyoung Add strsep(3) to libkern.

To avoid code duplication, move strsep.c to the kernel/userland
common files.

Soon I will commit source-address selection (options IPSELSRC).
It will use strsep(3).
 1.1.2.1 13-Nov-2006  dyoung file strsep.c was added on branch newlock2 on 2006-11-13 03:26:44 +0000
 1.3.78.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.78.1 21-Apr-2020  martin Sync with HEAD
 1.3 18-Jun-2023  rillig strspn: fix typo in comment
 1.2 04-Feb-2018  mrg branches: 1.2.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.1 19-Jul-2014  lneto branches: 1.1.2; 1.1.6;
lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
 1.1.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 19-Jul-2014  tls file strspn.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 19-Jul-2014  tls file strspn.c was added on branch tls-earlyentropy on 2014-08-10 06:47:06 +0000
 1.2.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.4.1 21-Apr-2020  martin Sync with HEAD
 1.3 04-Feb-2018  mrg branches: 1.3.4;
fixes for GCC 6:

- -Wstrict-prototypes is not available for C++, so don't try to
ignore it for C++.
- remove many _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
- use -Wno-error=frame-address for i386 mcount, as it seems valid
to assume the caller will have a frame.fair
 1.2 04-Jun-2007  christos handle fortify, ansify.
 1.1 20-Dec-2005  christos Merge libkern + libc common files. As requested by core.
 1.3.4.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.4.1 21-Apr-2020  martin Sync with HEAD

RSS XML Feed