Page MenuHomeFreeBSD

cdefs.h: Retire __const and __signed
ClosedPublic

Authored by imp on Wed, Jul 3, 6:45 PM.
Tags
None
Referenced Files
F87661420: D45860.diff
Sat, Jul 6, 4:12 PM
F87613787: D45860.diff
Fri, Jul 5, 8:41 PM
Unknown Object (File)
Fri, Jul 5, 5:17 PM
Subscribers
None

Details

Summary

These are no longer used in the base system. Once upon a time they were
used to ease the transition from K&R to ANSI C. These days, we use both
of these keywords in their bare form everywhere, even in our
headers. Any uses of const or signed will be converted to their ANSI
meaning in the compiler, but is beyond the scope of cdefs.h's
charter. For pure K&R compilation, with an enforced only use K&R
features and meanings, one needs to define NO_ANSI_KEYWORDS (though even
that support is wobbly at best, being active only for !GCC or
gcc-adjacent compilers which currently appears to be none).

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Wed, Jul 3, 6:45 PM
imp created this revision.
This revision is now accepted and ready to land.Thu, Jul 4, 10:00 AM
This revision was automatically updated to reflect the committed changes.