Open zetanumbers opened 2 years ago
@AzureMarker Could you take a look at this? A breaking change (changing some fields on some env) would be required to fix it, but I guess you're using this struct.
Oh and I believe after some digging some months ago, i found no rust target that would satisfy defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
. But still.
We're only using the struct for the "horizon" OS (Nintendo 3DS): https://github.com/rust-lang/libc/blob/1a311288a8f7523bfe5f88f57c6e96724eb16842/src/unix/newlib/horizon/mod.rs#L59-L74
I don't think we need any changes for that platform at least.
cc: @Meziu, @ian-h-chamberlain in case I miss something.
Yes, I believe we added the newlib::horizon::stat
struct specifically to avoid breaking anything that might have been using the existing newlib::stat
struct.
Based on this:
Oh and I believe after some digging some months ago, i found no rust target that would satisfy
defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
. But still.
Maybe we should maybe just take the horizon::stat
definition and use it as the generic newlib
definition, and if any platforms that meet the above criteria are added, they would need to create their own definition and use that (maybe a cfg_if!
block that checks for some equivalent of __svr4__
?).
Does that make sense?
https://github.com/rust-lang/libc/blob/1a311288a8f7523bfe5f88f57c6e96724eb16842/src/unix/newlib/generic.rs#L8-L26
newlib/libc/include/sys/stat.h
I would like to see
defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
case being handled for targets without nanoseconds.