diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-22 15:28:59 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-22 15:28:59 +0200 |
commit | f61580d461bc5773ef4b894852195630b007c601 (patch) | |
tree | 4b42ff27b8bbc52a2a7f6a8d4867f75dbaf294aa /gcc/ada/sysdep.c | |
parent | 6823270cb98959be5157725c7e0efd87c0b61e23 (diff) | |
download | gcc-f61580d461bc5773ef4b894852195630b007c601.zip gcc-f61580d461bc5773ef4b894852195630b007c601.tar.gz gcc-f61580d461bc5773ef4b894852195630b007c601.tar.bz2 |
[multiple changes]
2009-06-22 Jose Ruiz <ruiz@adacore.com>
* sysdep.c (__gnat_localtime_tzoff for RTX):
SystemTimeToTzSpecificLocalTime is not supported by RTX. Use
GetTimeZoneInformation instead.
2009-06-22 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Check_No_Direct_Boolean_Operators): New procedure
2009-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Collect_Previous_Instances): Do not collect
instantiations declared in a previous generic package body.
2009-06-22 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Add doc that X=True and X=False is allowed for the
restriction No_Direct_Boolean_Operators.
2009-06-22 Thomas Quinot <quinot@adacore.com>
* bindusg.adb: Minor fixes to gnatbind usage message
* sem_eval.adb: Minor reformatting
From-SVN: r148794
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index df3bee2..c048950 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -764,6 +764,22 @@ __gnat_localtime_tzoff (const time_t *timer, long *off) (*Lock_Task) (); +#ifdef RTX + + tzi_status = GetTimeZoneInformation (&tzi); + *off = tzi.Bias; + if (tzi_status == TIME_ZONE_ID_STANDARD) + /* The system is operating in the range covered by the StandardDate + member. */ + *off = *off + tzi.StandardBias; + else if (tzi_status == TIME_ZONE_ID_DAYLIGHT) + /* The system is operating in the range covered by the DaylightDate + member. */ + *off = *off + tzi.DaylightBias; + *off = *off * -60; + +#else + /* First convert unix time_t structure to windows FILETIME format. */ utc_time.ull_time = ((unsigned long long) *timer + w32_epoch_offset) * 10000000ULL; @@ -792,6 +808,8 @@ __gnat_localtime_tzoff (const time_t *timer, long *off) else *off = - (long) ((utc_time.ull_time - local_time.ull_time) / 10000000ULL); +#endif + (*Unlock_Task) (); } |