Open tgross35 opened 2 months ago
@joshtriplett do you have any thoughts here?
but on Hurd it is st_fsid. https://github.com/rust-lang/libc/pull/3785 proposes renaming this field to st_dev.
Note: the Hurd C API also provides the st_dev
alias for the st_fsid
field. So from the point of view of C, Hurd does provide the st_dev
name for the field too.
And also, in the struct stat
, it's already st_dev
which is defined in rust-libc, it's struct stat64
which wasn't fixed yet in rust-libc to follow the common practice of calling it st_dev
.
(put another way: if rust could support different names for the same field, we could ideally provide both st_dev
and st_fsid
. Otherwise, I'd say better provide the most standard variant, st_dev
)
Are there any news on this?
We have a couple PRs proposing something that makes platforms more consistent, but isn't exactly true to the C API. Two examples:
stat
has a fieldst_dev
on almost all platforms, but on Hurd it isst_fsid
. https://github.com/rust-lang/libc/pull/3785 proposes renaming this field tost_dev
.The reasoning for these suggestions is that it is pretty unlikely for library authors to special case Hurd or BSD, meaning builds will just break on these platforms. By making something consistent with Linux, it is more likely that things work out of the box without library authors needing to test these less common platforms.
I think an argument could be made in either direction, so I am bringing this up as a more general policy question.