NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

standards/58804: string.h: wrong visibility for memccpy



>Number:         58804
>Category:       standards
>Synopsis:       string.h: wrong visibility for memccpy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 01 19:15:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The Net/Open Stringation
>Environment:
>Description:
- memccpy is XSI, should be declared only for _XOPEN_SOURCE >= 600

Redundant _POSIX_C_SOURCE || _XOPEN_SOURCE tests can be nixed while here and replaced by mere _POSIX_C_SOURCE tests, now that sys/featuretest.h defines _POSIX_C_SOURCE appropriately if _XOPEN_SOURCE is defined.

References:
POSIX 2001 (_POSIX_C_SOURCE>=200112L, _XOPEN_SOURCE>=600): https://pubs.opengroup.org/onlinepubs/009695399/basedefs/string.h.html
POSIX 2008 (_POSIX_C_SOURCE>=200809L, _XOPEN_SOURCE>=700): https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html
>How-To-Repeat:
code standardization
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index