#
2dd10e69 |
| 01-Nov-2024 |
riastradh <riastradh@NetBSD.org> |
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
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
show more ...
|