OpenGrok
Cross Reference: strlcpy.c
xref
: /
src
/
common
/
lib
/
libc
/
string
/
strlcpy.c
Home
|
History
|
Annotate
|
Download
|
only in
string
History log of
/src/common/lib/libc/string/strlcpy.c
Revision
Date
Author
Comments
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;
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.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
Indexes created Sun Sep 21 20:09:37 GMT 2025