Skip to content

hurd: cleanups #4029

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Nov 12, 2024
Merged

hurd: cleanups #4029

merged 2 commits into from
Nov 12, 2024

Conversation

sthibaul
Copy link
Contributor

Description

This cleans a couple of details in the hurd port: ssize_t and align are currently not actually used

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

It is not used any more.
@rustbot
Copy link
Collaborator

rustbot commented Nov 12, 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

@tgross35
Copy link
Contributor

Could this also remove align.rs? Also, isn't ssize_t publicly exported?

@sthibaul
Copy link
Contributor Author

Could this also remove align.rs?

Sure, done so.

Also, isn't ssize_t publicly exported?

I have to admit I am completely at a loss at what platforms are supposed to export, I have not found a documentation that explains how this is organized. The Linux platform doesn't seem to be exporting ssize_t, so I assumed that it's not actually being in use in the wild? We don't use it for hurd-specific code at least.

@tgross35
Copy link
Contributor

ssize_t is actually exported in unix

pub type ssize_t = isize;
(I am surprised this wasn't already conflicting somehow). I'm not positive about the exact rules either but it seems like currently the typedef is ssize_t -> __ssize_t -> __sword_type -> c_int on 32-bit or c_long on 64-bit.

So AIUI, this change is making ssize_t always isize (signed pointer-sized type) rather than being manually defined to i32/i64. This seems preferable to me since it will be consistent with other platforms - as long as that seems reasonable to you then I think we can merge this.

(cc @sunfishcode since I see you crosslinked an issue)

@sthibaul
Copy link
Contributor Author

as long as that seems reasonable to you

Yes, this is reasonable, GNU/Hurd has nothing specific here compared to other unices.

@sthibaul
Copy link
Contributor Author

Since it's needed for rustix, a backport to 0.2 will be useful.

@tgross35
Copy link
Contributor

SGTM, thanks for the follow up

Since it's needed for rustix, a backport to 0.2 will be useful.

Feel free to just nominate anything that makes sense for a backport, the rustbot command works for everyone.

@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 Nov 12, 2024
@tgross35 tgross35 enabled auto-merge November 12, 2024 23:22
@tgross35 tgross35 added this pull request to the merge queue Nov 12, 2024
Merged via the queue into rust-lang:main with commit ffb7f0c Nov 12, 2024
43 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 13, 2024
It is not used any more.

(backport <rust-lang#4029>)
(cherry picked from commit 9f6aa3f)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 13, 2024
It is not used.

(backport <rust-lang#4029>)
(cherry picked from commit e2153f1)
@tgross35 tgross35 mentioned this pull request Nov 13, 2024
@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 Nov 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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