You are not logged in.

#1 2021-05-21 22:21:46

Attius_Sullivan
Member
Registered: 2019-11-02
Posts: 46

sys/bsd/tree.h why sometimes include sys/cdefs.h

Hi,

some time ago I stumbled over the `bsd/sys/{tree,queue}.h` C implementations. Now after looking more precise into the source code I read that these headers include `sys/cdefs.h` but when looking around on the internet into some other implementations (`bsd/sys/tree.h` as well) some of those do not include `sys/cdefs.h`.
The actual reason why I'm wondering, is that I see no point in this include, since the `{tree,queue}.h` simply define macros to use queues and trees. From what I know there should be no necessity to include additional headers.

Does someone know why it is that way, or why it might me necessary to include `cdefs.h`? Or since I don't really know where I'd be able to ask questions like this, maybe a tip where to ask as well.

Offline

Board footer

Powered by FluxBB