This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
detect struct stat.st_dev's size and signedness, and return it safely
On FreeBSD dev_t (and hence the st_dev member of struct stat) is an
unsigned 64-bit integer, and the previous simple PUSHi() corrupted
that.
A previous version of this reflected the st_ino code and implemented
our own number to string conversion, but a system with such a large
st_dev should be assumed to have inttypes.h, and an intmax_t which is
no smaller than st_dev.
The st_ino code could probably be changed similarly, but 64-bit inode
numbers are not a new thing, so it may be riskier.
15 files changed: