~ chicken-core (chicken-5) a77e710902d1bd6bd4a7e40fa3e72cd03529801b


commit a77e710902d1bd6bd4a7e40fa3e72cd03529801b
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Tue Jun 6 21:06:57 2017 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Thu Jun 8 11:31:56 2017 +1200

    Do not truncate file times to 32 bits on 32-bit or LLP platforms in setter
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/posixunix.scm b/posixunix.scm
index 54bfe7e4..f20623ec 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 735504c5..c0a2cf88 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);
 }
Trap