-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Haiku bsd #4221
base: main
Are you sure you want to change the base?
Haiku bsd #4221
Conversation
Haiku implements various parts of the (non-POSIX) BSD API. This moves it to a separate file, for easier future maintenance. No functional change intended; the changes are synchronized with R1Beta5
This includes: * sys/event.h: `kevent()`, `kqueue()`, data structure and constants * sys/iocomm.h: constants that are also defined for other platforms * stdlib.h: `mkstemps()` and `strtonum()` * sys/uov.h: `preadv()` and `pwritev()` * sys/wait.h: `wait4()`
// This file contains the BSD APIs available in Haiku. It corresponds to the | ||
// header files in `headers/compatibility/bsd`. | ||
// | ||
// Note that Haiku's BSD compatibility is a combination of system APIs and | ||
// utility libraries. There should only be system APIs in `libc`. When you are | ||
// trying to determine whether something should be included in this file, the | ||
// best indicator is whether it also exists in the BSD-specific definitions in | ||
// this libc crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind turning this into //!
module doc comments since it's moving anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggested nit, LGTM otherwise. Thanks for doing some cleanup here.
@rustbot label +stable-nominated
Description
Haiku implements various parts of the (non-POSIX) BSD API. This moves it to a separate file, for easier future maintenance. It also adds some missing functionality that is part of other platforms and that may be useful for other crates.
Note that this synchronizes with Haiku R1 Beta 5, which is the latest relaase.
Sources
See https://github.com/haiku/haiku/tree/r1beta5/headers/compatibility/bsd/ for all the headers that match up with the ones in the
bsd.rs
file.Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI
Note:
semver
is not used by Haiku (yet), so N/A. The test currently fails, but in a panic! in the garando_syntax crate. The panic is the same before and after the changes.