NetBSD-Bugs archive

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

lib/58752: various header files test _*_SOURCE macros but don't include sys/featuretest.h



>Number:         58752
>Category:       lib
>Synopsis:       various header files test _*_SOURCE macros but don't include sys/featuretest.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 13 21:05:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9
>Organization:
The _NETBSD_SOURCE Featuration
>Environment:
>Description:
<uchar.h> tests _NETBSD_SOURCE, _POSIX_C_SOURCE, and _ISOC23_SOURCE, but doesn't include <sys/featuretest.h> to get the defaults or default implications.

Several other candidate header files match in an amd64 install:

/usr/include/amd64/mcontext.h
/usr/include/arpa/nameser.h
/usr/include/event2/event-config.h
/usr/include/g++/bits/c++locale.h
/usr/include/i386/mcontext.h
/usr/include/langinfo.h
/usr/include/machine/mcontext.h
/usr/include/monetary.h
/usr/include/nl_types.h
/usr/include/regex.h
/usr/include/rmt.h
/usr/include/rump/rumpuser_port.h
/usr/include/ssp/ssp.h
/usr/include/sys/common_limits.h
/usr/include/sys/featuretest.h
/usr/include/sys/ttycom.h
/usr/include/uchar.h
/usr/include/zconf.h
/usr/include/zlib.h

Files under src matching this:

include/arpa/nameser.h
include/langinfo.h
include/monetary.h
include/nl_types.h
include/regex.h
include/rmt.h
include/ssp/ssp.h
include/uchar.h
sys/arch/alpha/include/fenv.h
sys/arch/alpha/include/mcontext.h
sys/arch/amd64/include/mcontext.h
sys/arch/arm/include/float.h
sys/arch/arm/include/mcontext.h
sys/arch/hppa/include/float.h
sys/arch/hppa/include/mcontext.h
sys/arch/i386/include/mcontext.h
sys/arch/ia64/include/fenv.h
sys/arch/ia64/include/float.h
sys/arch/ia64/include/limits.h
sys/arch/ia64/include/mcontext.h
sys/arch/m68k/include/fenv.h
sys/arch/m68k/include/float.h
sys/arch/m68k/include/mcontext.h
sys/arch/mips/include/fenv.h
sys/arch/mips/include/float.h
sys/arch/mips/include/mcontext.h
sys/arch/or1k/include/float.h
sys/arch/or1k/include/mcontext.h
sys/arch/powerpc/include/fenv.h
sys/arch/powerpc/include/mcontext.h
sys/arch/riscv/include/float.h
sys/arch/riscv/include/mcontext.h
sys/arch/sh3/include/fenv.h
sys/arch/sh3/include/mcontext.h
sys/arch/sparc/include/float.h
sys/arch/sparc/include/mcontext.h
sys/arch/vax/include/math.h
sys/arch/vax/include/mcontext.h
sys/sys/common_limits.h
sys/sys/epoll.h
sys/sys/featuretest.h
sys/sys/ttycom.h

(I have not reviewed all of these to see if the _*_SOURCE is relevant.  For example, sys/featuretest.h isn't needed for _FORTIFY_SOURCE at the moment as far as I know.)
>How-To-Repeat:
Try to use <uchar.h> without defining any feature macros, so that the default (_NETBSD_SOURCE) should be implied:

#include <uchar.h>

char8_t x;
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index