From 399464c1c83e9dc51871e3fa4b5afd4e9be512dc Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 4 Aug 2014 13:16:24 +0000 Subject: 2014-08-04 Doug Rupp * 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 * 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 --- gcc/ada/s-osinte-darwin.adb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gcc/ada/s-osinte-darwin.adb') 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; -- cgit v1.2.1