tech-toolchain archive

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

[clang-format] [NetBSD Style] Clarification regarding Include files order in NetBSD



Hi,
I am currently adding NetBSD style support to clang-format, I need some clarification regarding the order of include files to be followed in NetBSD while modifying SortIncludes to follow NetBSD-Style guide in sorting includes while formatting NetBSD code.

After discussing with my mentors @christos, @mgorny and some devs in #netbsd-code IRC channel I came up with a draft of this order of Include files,

<sys/param.h> -- should come first.

<sys/types.h> -- should come next

<sys/ *.h>        -- followed by <sys/ > block sorted alphdebitcal


<net/ *.h>         -- all blocks sorted alphabetical

<netinet/ *.h>  

<protocols/ *.h>


< /usr includes next>

<paths.h>


“User include files” -- in double quotes


There are some other includes such as <uvm/ *.h> ,  <fs/ *.h>, <dev/ *.h> which are also kernel includes, should they be after <sys/ *.>
Can I get more details regarding this include files order that I might have missed?
---
Regards,
Manikishan Ghantasala
B.tech CSE
foss@amrita


Home | Main Index | Thread Index | Old Index