OSDN Git Service

2011-12-02 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / a-calend-vms.adb
index ef97fa4..788ff28 100644 (file)
@@ -126,7 +126,7 @@ package body Ada.Calendar is
    --  The above flag controls the usage of leap seconds in all Ada.Calendar
    --  routines.
 
-   Leap_Seconds_Count : constant Natural := 23;
+   Leap_Seconds_Count : constant Natural := 24;
 
    ---------------------
    -- Local Constants --
@@ -176,7 +176,8 @@ package body Ada.Calendar is
       43271712190000000,
       43744320200000000,
       44218656210000000,
-      46427904220000000);
+      46427904220000000,
+      47374848230000000);
 
    ---------
    -- "+" --
@@ -920,11 +921,7 @@ package body Ada.Calendar is
 
          --  Step 3: Handle leap second occurrences
 
-         if Leap_Sec then
-            tm_sec := 60;
-         else
-            tm_sec := Second;
-         end if;
+         tm_sec := (if Leap_Sec then 60 else Second);
       end To_Struct_Tm;
 
       ------------------
@@ -1194,11 +1191,10 @@ package body Ada.Calendar is
             else
                --  Sub second extraction
 
-               if Day_Secs > 0.0 then
-                  Int_Day_Secs := Integer (Day_Secs - 0.5);
-               else
-                  Int_Day_Secs := Integer (Day_Secs);
-               end if;
+               Int_Day_Secs :=
+                 (if Day_Secs > 0.0
+                  then Integer (Day_Secs - 0.5)
+                  else Integer (Day_Secs));
 
                H  := Int_Day_Secs / 3_600;
                Mi := (Int_Day_Secs / 60) mod 60;