Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexkapshuk
Copy link
Contributor

@alexkapshuk alexkapshuk commented Jun 12, 2024

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.

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.
@danfe
Copy link

danfe commented Sep 9, 2024

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
Copy link
Contributor Author

alexkapshuk commented Sep 9, 2024

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 #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
Copy link

danfe commented Sep 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kcmp in cmd/sort.c conflicts with FreeBSD system header file
2 participants