-
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
linux/gnu: add utmp(5) default paths #1496
Conversation
r? @gnzlbg (rust_highfive has picked a reviewer for you, use r? to override) |
These should be extern statics without a default value. |
@gnzlbg thanks for the reviews! I have a couple of doubts when trying to apply your suggestion above (and I didn't spot any similar example in
I tried defining a bare extern static, but then consumers fail to link with That seems consistent to me with the fact that those are C pre-processor definitions and not actual constants, so they may not end up anywhere in the (public) ABI. I also run latest
|
What bindgen suggests sounds correct. |
This adds `utmp(5)` default paths on Linux with GNU libc. Ref: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/paths.h;h=1342ab3a96ab12065311b718e57e7235e07587f8;hb=HEAD
729709a
to
cc95952
Compare
Ack. I've updated the PR with that. |
There is an assertion triggering in ctest, which I believe is maybe due to ctest not supporting byte strings, e.g., you probably want to add a test for byte strings here: https://github.com/gnzlbg/ctest/blob/master/testcrate/src/t1.rs#L6 and then work up your way to adding support to ctest for these. Shouldn't be too hard since &'static str is already supported. |
Because these are preprocessor definitions, they don't really have a precise type. There isn't a symbol being bound to here, and nothing will break if we give them a better type for Rust. As a result, I think it'd make more sense to define these as (Also, as a side note, whatever's depending on utmp/wtmp/btmp paths, please make it cope with those files not existing, as they aren't required to exist.) I don't think we should add all of these, unless someone specifically needs them. Adding the ones people specifically ask for, that aren't historical relics, seems reasonable. |
☔ The latest upstream changes (presumably #1999) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
Closing as this is inactive for years and in favor of Josh's comment. Feel free to re-open if you really want them, we can re-consider it anytime. |
This adds
utmp(5)
default paths on Linux with GNU libc.Ref: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/paths.h;h=1342ab3a96ab12065311b718e57e7235e07587f8;hb=HEAD