From 44a187085319c440d28402914ad8ba4ac7b62578 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 6 Jun 2017 21:06:57 +0200 Subject: [PATCH 1/2] Do not truncate file times to 32 bits on 32-bit or LLP platforms in setter --- posixunix.scm | 4 ++-- posixwin.scm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/posixunix.scm b/posixunix.scm index 54bfe7e..f20623e 100644 --- a/posixunix.scm +++ b/posixunix.scm @@ -370,12 +370,12 @@ static int set_file_mtime(char *filename, C_word atime, C_word mtime) if (atime == C_SCHEME_FALSE) { tb.actime = sb.st_atime; } else { - tb.actime = C_num_to_int(atime); + tb.actime = C_num_to_int64(atime); } if (mtime == C_SCHEME_FALSE) { tb.modtime = sb.st_mtime; } else { - tb.modtime = C_num_to_int(mtime); + tb.modtime = C_num_to_int64(mtime); } return utime(filename, &tb); } diff --git a/posixwin.scm b/posixwin.scm index 735504c..c0a2cf8 100644 --- a/posixwin.scm +++ b/posixwin.scm @@ -648,12 +648,12 @@ static int set_file_mtime(char *filename, C_word atime, C_word mtime) if (atime == C_SCHEME_FALSE) { tb.actime = sb.st_atime; } else { - tb.actime = C_num_to_int(atime); + tb.actime = C_num_to_int64(atime); } if (mtime == C_SCHEME_FALSE) { tb.modtime = sb.st_mtime; } else { - tb.modtime = C_num_to_int(mtime); + tb.modtime = C_num_to_int64(mtime); } return _utime(filename, &tb); } -- 2.1.4