Including it is needed to have '__va_list' defined.
This is a step to make <sys/kassert.h> usable without the need to
explicitly include other headers.
Differential D49972
kassert: Explicitly include <sys/_types> Authored by olce on Apr 23 2025, 10:04 AM. Tags None Referenced Files
Subscribers
Details
Including it is needed to have '__va_list' defined. This is a step to make <sys/kassert.h> usable without the need to
Diff Detail
Event TimelineComment Actions title should likely say _types.h though. Comment Actions I could have sworn that style.9 says that one can assume that param.h and (_)types.h include cdefs.h, but I can't find any mention of that. IMO it's okay to drop the cdefs include, but it doesn't matter much here. Comment Actions Title will be fixed on commit. I regularly think similarly, and regularly re-read style.9 to remind me it's indeed not there. I'm fine with adding such a stance in style.9, as it seems this is already what people automatically assume. That said, I also think we should limit the number of such rules, and stick to explicit includes of directly referenced types/objects, except for technical/historical reasons/shortcomings or long-established practice.
This header directly uses features of cdefs.h (such as __printflike), so unless/until we decide on an official stance about cdefs.h being included by _types.h, I'd rather not remove the explicit include. |