Home | History | Annotate | Download | only in string
History log of /src/common/lib/libc/string/strlcat.c
RevisionDateAuthorComments
 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

RSS XML Feed