Skip to content

Add fixes from libc-test results#9

Merged
Meziu merged 2 commits into
Meziu:masterfrom
ian-h-chamberlain:fix/horizon-test-failures
Feb 16, 2022
Merged

Add fixes from libc-test results#9
Meziu merged 2 commits into
Meziu:masterfrom
ian-h-chamberlain:fix/horizon-test-failures

Conversation

@ian-h-chamberlain
Copy link
Copy Markdown

Complement to #8

I think we can merge this to master, but the other PR should probably have its own branch as we won't want to upstream most of the testing changes there.

Also, I took some liberties with the cfg_if! so if you think there are better conventions I can use then feel free to comment as needed.

Comment thread src/unix/newlib/mod.rs
pub st_blksize: blksize_t,
pub st_blocks: blkcnt_t,
pub st_spare4: [::c_long; 2usize],
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This change was kinda invasive, I could swap it out for a few #[cfg()] instead, but unfortunately it seems s! is incompatible with cfg_if! (which would otherwise be more readable).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I was trying to see if this is fixable, but it would require something like https://docs.rs/eager.

Comment thread src/unix/newlib/mod.rs
@AzureMarker
Copy link
Copy Markdown

I'm waiting on resolution of this comment, but otherwise the PR looks good:
Meziu/rust-horizon#14 (comment)

@ian-h-chamberlain
Copy link
Copy Markdown
Author

ian-h-chamberlain commented Feb 16, 2022

I'm waiting on resolution of this comment, but otherwise the PR looks good: Meziu/rust-horizon#14 (comment)

See my response there, I think we can leave it as-is for now.

Looking at other modules in libc, the only similar one that uses actual timespec seems to be wasi, and everything else uses something like this:

pub st_atime: ::time_t,
pub st_atime_nsec: ::c_long,

@Meziu Meziu merged commit 389e566 into Meziu:master Feb 16, 2022
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.

3 participants