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

Haiku bsd #4221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Haiku bsd #4221

wants to merge 2 commits into from

Conversation

nielx
Copy link
Contributor

@nielx nielx commented Dec 25, 2024

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

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (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.

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()`
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Comment on lines +3 to +10
// 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.
Copy link
Contributor

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?

Copy link
Contributor

@tgross35 tgross35 left a 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

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants