Commit ec3b72c5 by Arnaud Charlet Committed by Pierre-Marie de Rodat

[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
parent 57dfb3ec
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 :=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment