diff options
author | Doug Rupp <rupp@adacore.com> | 2021-04-26 10:14:37 -0700 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-05 13:09:12 +0000 |
commit | 35d721c09a5c8e4fb48d0a7a07da9220915bf0c1 (patch) | |
tree | 7201d6dc9137a5244a7670721e7de9c83853b018 | |
parent | a0bdd4b03b87a01a5984aa5c7ad94f66b2a7bc9e (diff) | |
download | gcc-35d721c09a5c8e4fb48d0a7a07da9220915bf0c1.zip gcc-35d721c09a5c8e4fb48d0a7a07da9220915bf0c1.tar.gz gcc-35d721c09a5c8e4fb48d0a7a07da9220915bf0c1.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/adaint.c | 4 | ||||
-rw-r--r-- | 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 b2d4de6..26be260 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 b03294f..a63ceef 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); |