public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2020] [Ada] The Unix Epochalypse of 2038 - Use OS_Time
@ 2021-07-05 13:14 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-05 13:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:35d721c09a5c8e4fb48d0a7a07da9220915bf0c1

commit r12-2020-g35d721c09a5c8e4fb48d0a7a07da9220915bf0c1
Author: Doug Rupp <rupp@adacore.com>
Date:   Mon Apr 26 10:14:37 2021 -0700

    [Ada] The Unix Epochalypse of 2038 - Use OS_Time
    
    gcc/ada/
    
            * adaint.h (__gnat_set_file_time_name): Use OS_Time.
            * adaint.c (__gnat_set_file_time_name): Likewise.

Diff:
---
 gcc/ada/adaint.c | 4 ++--
 gcc/ada/adaint.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index b2d4de6bf65..26be2600dd6 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -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);
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index b03294f2b18..a63ceef060b 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-05 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:14 [gcc r12-2020] [Ada] The Unix Epochalypse of 2038 - Use OS_Time Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).