Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
25a0f9cf
Commit
25a0f9cf
authored
Sep 26, 2019
by
Arnaud Charlet
Committed by
Arnaud Charlet
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
From-SVN: r276151
parent
9593e8e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
gcc/ada/ChangeLog
+4
-0
gcc/ada/osint.adb
+14
-2
No files found.
gcc/ada/ChangeLog
View file @
25a0f9cf
2019
-
09
-
26
Arnaud
Charlet
<
charlet
@
adacore
.
com
>
*
osint
.
adb
(
OS_Time_To_GNAT_Time
):
Remove
dependency
on
To_C
/
To_Ada
2019
-
09
-
23
Rainer
Orth
<
ro
@
CeBiTec
.
Uni
-
Bielefeld
.
DE
>
2019
-
09
-
23
Rainer
Orth
<
ro
@
CeBiTec
.
Uni
-
Bielefeld
.
DE
>
*
libgnarl
/
s
-
osinte__solaris
.
ads
(
sysconf
):
Declare
.
*
libgnarl
/
s
-
osinte__solaris
.
ads
(
sysconf
):
Declare
.
...
...
gcc/ada/osint.adb
View file @
25a0f9cf
...
@@ -2183,7 +2183,19 @@ package body Osint is
...
@@ -2183,7 +2183,19 @@ package body Osint is
function OS_Time_To_GNAT_Time (T : OS_Time) return Time_Stamp_Type is
function OS_Time_To_GNAT_Time (T : OS_Time) return Time_Stamp_Type is
GNAT_Time : Time_Stamp_Type;
GNAT_Time : Time_Stamp_Type;
TI : Long_Integer := To_C (T);
type Underlying_OS_Time is
range -(2 ** (Standard'
Address_Size
-
Integer
'(1))) ..
+(2 ** (Standard'
Address_Size
-
Integer
'(1)) - 1);
-- Underlying_OS_Time is a redeclaration of OS_Time to allow integer
-- manipulation. Remove this in favor of To_Ada/To_C once newer
-- GNAT releases are available with these functions.
function To_Int is
new Unchecked_Conversion (OS_Time, Underlying_OS_Time);
function From_Int is
new Unchecked_Conversion (Underlying_OS_Time, OS_Time);
TI : Underlying_OS_Time := To_Int (T);
Y : Year_Type;
Y : Year_Type;
Mo : Month_Type;
Mo : Month_Type;
D : Day_Type;
D : Day_Type;
...
@@ -2205,7 +2217,7 @@ package body Osint is
...
@@ -2205,7 +2217,7 @@ package body Osint is
TI := TI + 1;
TI := TI + 1;
end if;
end if;
GM_Split (
To_Ada
(TI), Y, Mo, D, H, Mn, S);
GM_Split (
From_Int
(TI), Y, Mo, D, H, Mn, S);
Make_Time_Stamp
Make_Time_Stamp
(Year => Nat (Y),
(Year => Nat (Y),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment