Open cgzones opened 1 year ago
On windows stat::st_mode https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L60 and S_IFMT (and other mode flags) https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L146 are of different type, resulting in code like
stat::st_mode
S_IFMT
fn is_regular(stat: &libc::stat) -> bool { stat.st_mode & libc::S_IFMT == libc::S_IFREG }
to not be portable.
We need to check if these are in fact different types in Windows headers, or if they're the same type and we have an error in the crate's types.
Here's the ucrt header.
On windows
stat::st_mode
https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L60 andS_IFMT
(and other mode flags) https://github.com/rust-lang/libc/blob/bac14427831aaff9b79dcdd125c03109414215c5/src/windows/mod.rs#L146 are of different type, resulting in code liketo not be portable.