[Ada] Turn Ada.Calendar.Epoch_Offset into a function
2018-05-29 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a function. From-SVN: r260878
This commit is contained in:
parent
57dfb3eca0
commit
ec3b72c55d
@ -1,3 +1,8 @@
|
||||
2018-05-29 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
|
||||
function.
|
||||
|
||||
2018-05-29 Olivier Hainque <hainque@adacore.com>
|
||||
|
||||
* libgnat/system-vxworks7-ppc-rtp.ads: New file.
|
||||
|
@ -500,6 +500,15 @@ is
|
||||
return D;
|
||||
end Day;
|
||||
|
||||
------------------
|
||||
-- Epoch_Offset --
|
||||
------------------
|
||||
|
||||
function Epoch_Offset return Time_Rep is
|
||||
begin
|
||||
return (136 * 365 + 44 * 366) * Nanos_In_Day;
|
||||
end Epoch_Offset;
|
||||
|
||||
-------------
|
||||
-- Is_Leap --
|
||||
-------------
|
||||
|
@ -221,8 +221,9 @@ private
|
||||
-- with overloading ambiguities in the body if we tried to use Time as an
|
||||
-- internal computational type.
|
||||
|
||||
Epoch_Offset : constant Time_Rep := (136 * 365 + 44 * 366) * Nanos_In_Day;
|
||||
-- The difference between 2150-1-1 UTC and 1970-1-1 UTC expressed in
|
||||
function Epoch_Offset return Time_Rep;
|
||||
pragma Inline (Epoch_Offset);
|
||||
-- Return the difference between 2150-1-1 UTC and 1970-1-1 UTC expressed in
|
||||
-- nanoseconds. Note that year 2100 is non-leap.
|
||||
|
||||
Days_In_Month : constant array (Month_Number) of Day_Number :=
|
||||
|
Loading…
Reference in New Issue
Block a user