summaryrefslogtreecommitdiff
path: root/gcc/ada/s-osinte-darwin.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 13:16:24 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-04 13:16:24 +0000
commit399464c1c83e9dc51871e3fa4b5afd4e9be512dc (patch)
tree73c1d8724a11d5b770c663c6bdccda7de328fbed /gcc/ada/s-osinte-darwin.adb
parent658ba466f0b9c7bfeeaeb5f78954ce97b404c401 (diff)
downloadgcc-399464c1c83e9dc51871e3fa4b5afd4e9be512dc.tar.gz
2014-08-04 Doug Rupp <rupp@adacore.com>
* g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec formal to long_long. * g-calend.ads (timeval): Bump up size to accomodate sec type. * s-taprop-linux.adb (timeval_to_duration): Change sec formal to long_long * s-osprim-posix.adb (timeval): Bump up size to accomodate new sec type. (timeval_to_duration): Change sec formal to Long_Long_Integer * s-osinte-darwin.adb (timeval): Bump up size to accomodate new sec type. (timeval_to_duration): Change sec formal to long_long * s-osinte-android.adb: Likewise. * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change sec formal from long to long long. 2014-08-04 Robert Dewar <dewar@adacore.com> * sem_res.adb (Resolve_Qualified_Expression): Make sure Do_Range_Check flag gets set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213587 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-osinte-darwin.adb')
-rw-r--r--gcc/ada/s-osinte-darwin.adb15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/s-osinte-darwin.adb b/gcc/ada/s-osinte-darwin.adb
index 3bf0bb96d65..e5add8a89bb 100644
--- a/gcc/ada/s-osinte-darwin.adb
+++ b/gcc/ada/s-osinte-darwin.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2014, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -35,9 +35,11 @@ pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems.
-package body System.OS_Interface is
+with Interfaces.C.Extensions;
+package body System.OS_Interface is
use Interfaces.C;
+ use Interfaces.C.Extensions;
-----------------
-- To_Duration --
@@ -97,16 +99,19 @@ package body System.OS_Interface is
use Interfaces;
- type timeval is array (1 .. 2) of C.long;
+ type timeval is array (1 .. 3) of C.long;
+ -- The timeval array is sized to contain long_long sec and long usec.
+ -- If long_long'Size = long'Size then it will be overly large but that
+ -- won't effect the implementation since it's not accessed directly.
procedure timeval_to_duration
(T : not null access timeval;
- sec : not null access C.long;
+ sec : not null access C.Extensions.long_long;
usec : not null access C.long);
pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration");
Micro : constant := 10**6;
- sec : aliased C.long;
+ sec : aliased C.Extensions.long_long;
usec : aliased C.long;
TV : aliased timeval;
Result : int;