Bug 251270

Summary: dirname in libgen.h relies on C11 features
Product: Base System Reporter: Simon Ser <contact>
Component: standardsAssignee: freebsd-standards (Nobody) <standards>
Status: Open ---    
Severity: Affects Only Me CC: markj
Priority: ---    
Version: 12.2-STABLE   
Hardware: Any   
OS: Any   

Description Simon Ser 2020-11-20 13:15:21 UTC
Building a program which calls `dirname` in C99 mode results in the following error:

https://builds.sr.ht/~emersion/job/347469#bottom

Instead, the compat selection which uses C11's _Generic should be disabled when building with C99 mode.
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2020-11-24 22:58:04 UTC
Perhaps cdefs.h should be using __has_feature instead of __has_extension when defining __generic().