diff options
author | Tony Cook <tony@develop-help.com> | 2021-07-09 10:22:40 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2021-09-01 10:59:44 +1000 |
commit | 9b5699737a6b587546239d586832f420cf7f2dea (patch) | |
tree | 37f4fec318866b00f20095ba66f60faa44788cd6 /Cross | |
parent | b852e1da77b497e086508451bebff00541073fb1 (diff) | |
download | perl-9b5699737a6b587546239d586832f420cf7f2dea.tar.gz |
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.
Diffstat (limited to 'Cross')
-rw-r--r-- | Cross/config.sh-arm-linux | 2 | ||||
-rw-r--r-- | Cross/config.sh-arm-linux-n770 | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index fd1a1988f0..3df3dcfce6 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -1078,6 +1078,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype='ssize_t' +st_dev_sign='1' +st_dev_size='4' st_ino_sign='1' st_ino_size='4' startperl='#!/usr/bin/perl' diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index bd9f154975..8e13f415c9 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -1076,6 +1076,8 @@ srand48_r_proto='0' srandom_r_proto='0' src='.' ssizetype='ssize_t' +st_dev_sign='1' +st_dev_size='4' st_ino_sign='1' st_ino_size='4' startperl='#!/usr/bin/perl' |