This limits the namespace of tcp_[gs]et_flags as suggested by karels and kib in D43231.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
There is another namespace issue in tcp.h. There have been several additions near the end of the file, after the #endif at line 458. The #endif closes the #ifdef _BSD_VISIBLE at line 181. The #endif should be moved to line 544, just before the closing #endif, as the additions are not in POSIX, and the #endif should be commented as /* _BSD_VISIBLE */ so people are less likely to add things after it. If you don't want to combine the namespace fixes, I can do it later.
sys/netinet/tcp.h | ||
---|---|---|
96 | I.e. using function-like macro is more to the point there, at least checking the number of args for substitution. |
Q: Are Userspace Applications then supposed use the __tcp_[gs]et_flags directly, or #define their tcp_[gs]et_flags locally?
It is up to the app itself, we cannot mandate it. In both cases the code uses __tcp_set_flags(), further style issues are outside the scope of the OS compilation environment.
sys/netinet/tcp.h | ||
---|---|---|
91–92 | since you are fixing the style issue with tab. |
sys/netinet/tcp.h | ||
---|---|---|
91–92 | Addressed with the latest patch. |
Moving the #endif might be worth mentioning in the description too; only TCP_NODELAY should be visible without __BSD_VISIBLE