diff options
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index aa38c5c..ee951e3 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -643,11 +643,11 @@ long __gnat_invalid_tzoff = 259273; /* Reentrant localtime for Windows. */ extern void -__gnat_localtime_tzoff (const time_t *, const int *, long *); +__gnat_localtime_tzoff (const OS_Time *, const int *, long *); static const unsigned long long w32_epoch_offset = 11644473600ULL; void -__gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off) +__gnat_localtime_tzoff (const OS_Time *timer, const int *is_historic, long *off) { TIME_ZONE_INFORMATION tzi; @@ -737,10 +737,10 @@ __gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off) the Lynx convention when building against the legacy API. */ extern void -__gnat_localtime_tzoff (const time_t *, const int *, long *); +__gnat_localtime_tzoff (const OS_Time *, const int *, long *); void -__gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off) +__gnat_localtime_tzoff (const OS_Time *timer, const int *is_historic, long *off) { *off = 0; } @@ -756,21 +756,22 @@ extern void (*Lock_Task) (void); extern void (*Unlock_Task) (void); extern void -__gnat_localtime_tzoff (const time_t *, const int *, long *); +__gnat_localtime_tzoff (const OS_Time *, const int *, long *); void -__gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED, +__gnat_localtime_tzoff (const OS_Time *timer ATTRIBUTE_UNUSED, const int *is_historic ATTRIBUTE_UNUSED, long *off ATTRIBUTE_UNUSED) { struct tm tp ATTRIBUTE_UNUSED; + const time_t time = (time_t) *timer; /* AIX, HPUX, Sun Solaris */ #if defined (_AIX) || defined (__hpux__) || defined (__sun__) { (*Lock_Task) (); - localtime_r (timer, &tp); + localtime_r (&time, &tp); *off = (long) -timezone; (*Unlock_Task) (); @@ -787,7 +788,7 @@ __gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED, { (*Lock_Task) (); - localtime_r (timer, &tp); + localtime_r (&time, &tp); /* Try to read the environment variable TIMEZONE. The variable may not have been initialize, in that case return an offset of zero (0) for UTC. */ @@ -833,7 +834,7 @@ __gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED, || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \ || defined (__DJGPP__) || defined (__QNX__) { - localtime_r (timer, &tp); + localtime_r (&time, &tp); *off = tp.tm_gmtoff; } |