]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] The Unix Epochalypse of 2038 - Use OS_Time
authorDoug Rupp <rupp@adacore.com>
Mon, 26 Apr 2021 17:14:37 +0000 (10:14 -0700)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 5 Jul 2021 13:09:12 +0000 (13:09 +0000)
gcc/ada/

* adaint.h (__gnat_set_file_time_name): Use OS_Time.
* adaint.c (__gnat_set_file_time_name): Likewise.

gcc/ada/adaint.c
gcc/ada/adaint.h

index b2d4de6bf65e43df63204cdb178b18506b939e09..26be2600dd6bed07be4280811ae640db937b993f 100644 (file)
@@ -1570,7 +1570,7 @@ extern long long __gnat_file_time(char* name)
 /* Set the file time stamp.  */
 
 void
-__gnat_set_file_time_name (char *name, time_t time_stamp)
+__gnat_set_file_time_name (char *name, OS_Time time_stamp)
 {
 #if defined (__vxworks)
 
@@ -1606,7 +1606,7 @@ __gnat_set_file_time_name (char *name, time_t time_stamp)
   time_t t;
 
   /* Set modification time to requested time.  */
-  utimbuf.modtime = time_stamp;
+  utimbuf.modtime = (time_t) time_stamp;
 
   /* Set access time to now in local time.  */
   t = time (NULL);
index b03294f2b18d4773d80a85c182de10acd9e39aad..a63ceef060b527f0ec32e37fe7a387ba14dd6e6e 100644 (file)
@@ -201,7 +201,7 @@ extern OS_Time __gnat_file_time_name                (char *);
 extern OS_Time __gnat_file_time_fd                  (int);
 /* return -1 in case of error */
 
-extern void   __gnat_set_file_time_name                   (char *, time_t);
+extern void   __gnat_set_file_time_name                   (char *, OS_Time);
 
 extern int    __gnat_dup                                   (int);
 extern int    __gnat_dup2                                  (int, int);