Page MenuHomeFreeBSD

style(9): Add advice about $FreeBSD$

Authored by imp on Jun 16 2021, 3:39 PM.



Codify our standard practice with $FreeBSD$
o New code only needs it if it might land in stable/12
o Old code should retain it until stable/12 is unsupported
o We'll do a bulk remove in the future: don't do it proactively.

Sponsored by: Netflix

Diff Detail

rS FreeBSD src repository - subversion
Lint OK
No Unit Test Coverage
Build Status
Buildable 39955
Build 36844: arc lint + arc unit

Event Timeline

imp requested review of this revision.Jun 16 2021, 3:39 PM

Minor nit, thanks for the update.



Wording tweak from bcr
Use .Li markup as used elsewhere for $FreeBSD$
Add ", if applicable" to an earlier mention of $FreeBSD$

imp marked an inline comment as done.Jun 16 2021, 5:21 PM

Tweaked a little.
A bit torn on whether to move the bulk of the wording changes up or not...

Add some additional, relevant advice.

allanjude added inline comments.

Possibly as a separate commit:

For non C/C++ language source files, if applicable, add
.Li $\&FreeBSD$
after any copyright and license comment.

This revision is now accepted and ready to land.Jun 17 2021, 2:00 PM

take up allanjude's suggestion, with a tweak or two (sorry allan,
I did this before I saw your review :)

This revision now requires review to proceed.Jun 17 2021, 2:55 PM
ceri added inline comments.

This is a little unclear. Do C/C++ source files need to follow the same rules about including/not including $FreeBSD$? If so, why is this highlighted text where it is?

Try to address ceri's concern


I did a reorder to mention both cases, which should clear things up.

This revision is now accepted and ready to land.Jun 17 2021, 6:22 PM
This revision was automatically updated to reflect the committed changes.