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

Re-export c_char_def as c_char instead of defining c_char per target #4201

Closed
wants to merge 1 commit into from

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Dec 17, 2024

Description

Replaces #4199 by doing #4199 (comment).

Closes #4199.

Sources

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 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

@taiki-e
Copy link
Member Author

taiki-e commented Dec 17, 2024

Hmm...

https://github.com/rust-lang/libc/actions/runs/12372572407/job/34531085124?pr=4201

src/teeos/mod.rs:12: import found after module when it belongs before
src/vxworks/riscv64.rs:3: typedef found after module when it belongs before
src/vxworks/aarch64.rs:3: typedef found after module when it belongs before
src/vxworks/riscv32.rs:3: typedef found after module when it belongs before
src/vxworks/x86_64.rs:3: typedef found after module when it belongs before
... (omitted)
src/unix/nto/aarch64.rs:2: import found after module when it belongs before
src/unix/nto/x86_64.rs:2: import found after module when it belongs before
src/wasi/mod.rs:9: import found after module when it belongs before

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2024

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in OpenBSD module

cc @semarie

@tgross35
Copy link
Contributor

tgross35 commented Dec 17, 2024

Hmm...

https://github.com/rust-lang/libc/actions/runs/12372572407/job/34531085124?pr=4201

src/teeos/mod.rs:12: import found after module when it belongs before
src/vxworks/riscv64.rs:3: typedef found after module when it belongs before
src/vxworks/aarch64.rs:3: typedef found after module when it belongs before
src/vxworks/riscv32.rs:3: typedef found after module when it belongs before
src/vxworks/x86_64.rs:3: typedef found after module when it belongs before
... (omitted)
src/unix/nto/aarch64.rs:2: import found after module when it belongs before
src/unix/nto/x86_64.rs:2: import found after module when it belongs before
src/wasi/mod.rs:9: import found after module when it belongs before

This repo has really old tooling that likes to complain about a lot. It might need a fix if it's not reporting something accurately.

My idea with having c_char_def is that I could go through one OS at a time and double check that things line up, replacing arch-specific type c_chars = ... in e.g. some_os/{aarch64,x86_64,arm}.rs with a pub use crate::arch::c_char_def as c_char; in some_os/mod.rs if things line up. Unfortunately I don't think that changing from definitions to reexports really highlights any remaining discrepancies.

Admittedly this plan was from before I knew anyone else was working on this so I am open to other suggestions, but could at least the known changes in #4199 get in before updating everything else?

@taiki-e
Copy link
Member Author

taiki-e commented Dec 17, 2024

(The approach I said I think is ideal in #4199 (comment), doesn't have such an CI problem: #4202)

@taiki-e
Copy link
Member Author

taiki-e commented Dec 17, 2024

Closing in favor of #4202, which is doing the approach I said I think is ideal in #4199 (comment).

@taiki-e taiki-e closed this Dec 17, 2024
@taiki-e taiki-e deleted the c-char2 branch December 17, 2024 12:47
@taiki-e taiki-e mentioned this pull request Dec 17, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants