summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2011-07-27 21:32:37 +1000
committerTony Cook <tony@develop-help.com>2011-08-01 21:09:26 +1000
commit8d8cba88681398d40004e97bcb93f7f8b88ae05e (patch)
tree7c391d660e595078570ce4d272bb9e213a809cde
parent5b98c4ac368206a9a55a1ed23f09a264e588df21 (diff)
downloadperl-8d8cba88681398d40004e97bcb93f7f8b88ae05e.tar.gz
[rt #84590] try to preserve the inode number, even if it's large
This matches the checks done for other stat() fields.
-rw-r--r--pp_sys.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 726be76c4b..a6949a9d33 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2834,7 +2834,15 @@ PP(pp_stat)
EXTEND(SP, max);
EXTEND_MORTAL(max);
mPUSHi(PL_statcache.st_dev);
+#if ST_INO_SIZE > IVSIZE
+ mPUSHn(PL_statcache.st_ino);
+#else
+# if ST_INO_SIGN <= 0
mPUSHi(PL_statcache.st_ino);
+# else
+ mPUSHu(PL_statcache.st_ino);
+# endif
+#endif
mPUSHu(PL_statcache.st_mode);
mPUSHu(PL_statcache.st_nlink);
#if Uid_t_size > IVSIZE