◐ Shell
clean mode source ↗

gh-113078: Use uint64 for dev_t and uint32 for makedev params by renatoalencar · Pull Request #113080 · python/cpython

@renatoalencar

Following the implementions from both FreeBSD and GNU glibc,
`PyLong_FromDev should actually be unsigned. This can break
on FreeBSD systems using ZFS, since they wouldn't generate
device IDs with 56 upper bits randomly, therefore the MSB
too.

Also, following the documentation from FreeBSD and Linux,
`makedev` should accept unsigned 32 bit integers. The reason
to that is because on FreeBSD `major` and `minor` can return
anything on the 32 bit int range and on Linux it really specifies
that it returns a unsigned integer.