Skip to content

Make utmp(x) support more platforms #353

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 5 commits into from
Aug 9, 2016
Merged

Conversation

knight42
Copy link
Contributor

@knight42 knight42 commented Aug 8, 2016

Also ignored deprecated functions readdir_r and readdir64_r that fail the tests.

#[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
#[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]
pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
result: *mut *mut ::dirent) -> ::c_int;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite these being deprecated, we can't remove these due to backwards compatibility, could these stick around for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to ignore them in the tests.

@@ -350,6 +353,9 @@ fn main() {
cfg.skip_fn(move |name| {
// skip those that are manually verified
match name {
// glibc-2.24 deprecates these functions
"readdir_r" | "readdir64_r" => true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can these still be tested and the deprecation warning allowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message is pasted below.

out/all.c: In function ‘__test_fn_readdir_r’:
out/all.c:2061:17: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
                 return readdir_r;
                 ^~~~~~
out/all.c:16:0:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~

Perhaps we can pass -Wno-deprecated-declarations to the compiler? Is that acceptable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

@knight42
Copy link
Contributor Author

knight42 commented Aug 9, 2016

Got it. It is written in Cargo.lock

@alexcrichton Why did cargo choose a rather old commit of ctest in qemu-openbsd?

Here is the comparison between commit 7703b51 and master

@knight42
Copy link
Contributor Author

knight42 commented Aug 9, 2016

@alexcrichton could be merge now

@alexcrichton
Copy link
Member

Awesome, thanks!

@alexcrichton alexcrichton merged commit 3630c46 into rust-lang:master Aug 9, 2016
@knight42 knight42 deleted the utmp branch August 9, 2016 16:06
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
Cast function item to function pointer in order to appease compiler.

This is necessary because of compiler changes. For further information
look at rust-lang/rust#19925.

This solves rust-lang#346.

I know that there are other problems with the affected function. We are thinking about how to best pass the arguments to the function and we don't want to define the ffi's ourselves. However, I would like to get the warning out of our tree as soon as possible. We do not need to wait for our polish.
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
…ang#353)

* migrate to rustfmt-preview and require rustfmt to pass

* reformat with rustfmt-preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants