Skip to content

Relocate <spawn.h> functions to define them to dragonfly. #4294

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

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

jrmarino
Copy link
Contributor

@jrmarino jrmarino commented Mar 3, 2025

While here:

  • Relocate mkostemp and mkostemps functions for same reason
  • Update semver tests for DF spawn and mkostemp(s)

Description

This changeset exposes bindings for mkostemp, mkostemps, and the <spawn.h> functions on DragonFly.
It does this by moving freebsd-specific definitions in the generic freebsdlike mod.rs file.
These are required to build fish 4.0.0 (https://github.com/fish-shell/fish-shell)

Sources

FreeBSD

https://github.com/freebsd/freebsd-src/blob/e7c0cb720898fd36487c4e6b0aff52435084e6bf/include/spawn.h
https://github.com/freebsd/freebsd-src/blob/e7c0cb720898fd36487c4e6b0aff52435084e6bf/include/stdlib.h#L305-L307

DragonFly

https://raw.githubusercontent.com/DragonFlyBSD/DragonFlyBSD/refs/heads/master/include/spawn.h
https://raw.githubusercontent.com/DragonFlyBSD/DragonFlyBSD/refs/heads/master/include/stdlib.h

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

While here:
  - Relocate mkostemp and mkostemps functions for same reason
  - Update semver tests for DF spawn and mkostemp(s)
@rustbot
Copy link
Collaborator

rustbot commented Mar 3, 2025

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

@jrmarino
Copy link
Contributor Author

jrmarino commented Mar 3, 2025

replaces #4294

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.

LGTM after CI passes, please add permalinks to the actual headers in the PR description.

@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 Mar 3, 2025
@jrmarino
Copy link
Contributor Author

jrmarino commented Mar 3, 2025

Okay, I updated the PR description with links to github mirror to the headers.
I'm worried about the nightly freebsd-13 x86_64 failure. I don't think my change caused it, but I am nowhere close to an expert.

@tgross35
Copy link
Contributor

tgross35 commented Mar 3, 2025

Oh does Dragonfly just use the FreeBSD headers? Thanks for the links, I updated them to permalinks so we have a reference if things change.

That job has been a bit flaky through Cirrus updates, looks like it passed with a rerun.

@tgross35 tgross35 added this pull request to the merge queue Mar 3, 2025
@jrmarino
Copy link
Contributor Author

jrmarino commented Mar 3, 2025

oh, sorry, that was a mistake, I'm not sure what I was thinking about those headers.. I will update again.

@jrmarino
Copy link
Contributor Author

jrmarino commented Mar 3, 2025

Okay, both FreeBSD and DragonFly header paths are provided now.

@tgross35
Copy link
Contributor

tgross35 commented Mar 4, 2025

Awesome, thank you. I updated these to permalinks as well (it's just an option under the triple dots when looking at a file on GH).

Merged via the queue into rust-lang:main with commit 10ef8ab Mar 4, 2025
44 checks passed
@jrmarino jrmarino deleted the dfly-spawn-mkostemp-2 branch March 4, 2025 00:17
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Mar 10, 2025
While here:
  - Relocate mkostemp and mkostemps functions for same reason
  - Update semver tests for DF spawn and mkostemp(s)

(backport <rust-lang#4294>)
[ update constants to c_int to match libc-0.2 - Trevor ]
(cherry picked from commit a294be6)
@tgross35 tgross35 mentioned this pull request Mar 10, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Mar 10, 2025
While here:
  - Relocate mkostemp and mkostemps functions for same reason
  - Update semver tests for DF spawn and mkostemp(s)

(backport <rust-lang#4294>)
[ update constants to c_int to match libc-0.2 - Trevor ]
(cherry picked from commit a294be6)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 10, 2025
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-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants