diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-22 13:28:59 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-22 13:28:59 +0000 |
commit | 1cf3e68fce1617b528b52884a6e32e0692a33bb0 (patch) | |
tree | 4b42ff27b8bbc52a2a7f6a8d4867f75dbaf294aa /gcc/ada/sysdep.c | |
parent | 0c6022602c0531dbafa2e9f9411ca805bacaa7bb (diff) | |
download | gcc-1cf3e68fce1617b528b52884a6e32e0692a33bb0.tar.gz |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148794 138bc75d-0d04-0410-961f-82ee72b054a4
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 df3bee2c3e8..c0489504f43 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) (); } |