NetBSD-Bugs archive

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

standards/58741: reallocarray(3) is not restricted to _NETBSD_SOURCE or _POSIX_C_SOURCE>=202405L



>Number:         58741
>Category:       standards
>Synopsis:       reallocarray(3) is not restricted to _NETBSD_SOURCE or _POSIX_C_SOURCE>=202405L
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 11 18:15:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10
>Organization:
The NetBSD Refoundarraytion
>Environment:
>Description:
In include/stdlib.h 1.125, the declaration of reallocarray(3) was made unconditional, but since it is new in POSIX 2024, it should be limited to _NETBSD_SOURCE or _POSIX_C_SOURCE>=202405L.
>How-To-Repeat:
compile code that uses the name `reallocarray' for itself under, e.g.,_POSIX_C_SOURCE=200809L
>Fix:
#if defined _NETBSD_SOURCE || (_POSIX_C_SOURCE - 0) >= 202405L



Home | Main Index | Thread Index | Old Index