9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.64k stars 326 forks source link

cmd/sort: Rename kcmp to Kcmp to fix FreeBSD compile error #655

Open alexkapshuk opened 5 months ago

alexkapshuk commented 5 months ago

FreeBSD 14.1 introduced the kcmp(2) system call, which is declaired in unistd.h.

This symbol colides with the kcmp function which is local to sort.c and results in a compile time error.

Rename kcmp to Kcmp to prevent symbol name collision.

Fixes #648.

danfe commented 2 months ago

I don't think that Kcmp is significantly better than kcmp as a symbol name, both are still four-letter names and thus prone to future collisions.

alexkapshuk commented 2 months ago

I don't think that Kcmp is significantly better than kcmp as a symbol name, both are still four-letter names and thus prone to future collisions.

I see that you've responded in https://github.com/9fans/plan9port/issues/648 with the intent to rename kcmp to keycmp. Fair enough. Thanks for your input. Shall I close the PR, or were you going to do it?

danfe commented 2 months ago

Shall I close the PR, or were you going to do it?

I don't have a particular preference or intention on how this problem is going to be handled, so I'd probably leave it up to developers, they should have enough information by now to make the weighted decision.