This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD
- From: Matthias Klose <doko at ubuntu dot com>
- To: Arnaud Charlet <charlet at adacore dot com>, James Clarke <jrtc27 at debian dot org>
- Cc: gcc-patches at gcc dot gnu dot org, James Clarke <jrtc27 at jrtc27 dot com>
- Date: Thu, 4 Jul 2019 15:23:32 +0200
- Subject: Re: [PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD
- References: <20190703223514.65803-1-jrtc27@debian.org> <20190704065045.GA18833@adacore.com>
On 04.07.19 08:50, Arnaud Charlet wrote:
> OK, thanks.
checked in. Ok for the gcc-9 branch as well?
Matthias
>> From: James Clarke <jrtc27@jrtc27.com>
>>
>> Monotonic_Clock and RT_Resolution in the recently-added s-tpopmo.adb
>> call clock_gettime/clock_getres with the integral constants from OSC and
>> thus rely on clockid_t being an integral type, so we cannot hide it on
>> GNU/kFreeBSD. Instead, make the definition public to match all the other
>> implementations.
>>
>> gcc/ada
>> * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
>> definition public.
>> (CLOCK_REALTIME): Make value public.
>> ---
>> gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads b/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads
>> index 408187314..b60ffd2c0 100644
>> --- a/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads
>> +++ b/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads
>> @@ -206,9 +206,8 @@ package System.OS_Interface is
>> function nanosleep (rqtp, rmtp : access timespec) return int;
>> pragma Import (C, nanosleep, "nanosleep");
>>
>> - type clockid_t is private;
>> -
>> - CLOCK_REALTIME : constant clockid_t;
>> + type clockid_t is new int;
>> + CLOCK_REALTIME : constant clockid_t := 0;
>>
>> function clock_gettime
>> (clock_id : clockid_t;
>> @@ -607,9 +606,6 @@ private
>> end record;
>> pragma Convention (C, timespec);
>>
>> - type clockid_t is new int;
>> - CLOCK_REALTIME : constant clockid_t := 0;
>> -
>> type pthread_attr_t is record
>> detachstate : int;
>> schedpolicy : int;
>> --
>> 2.17.1
>>