From 3dc553dd32388c2d0528584d08d2d37538330462 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 31 May 2016 18:59:36 +0000 Subject: [PATCH] re PR ada/71317 (Compiling gnat for rtems fails at s-taprop.adb) * s-osinte-kfreebsd-gnu.ads (clock_getres): Define. (Get_Page_Size): Remove duplicate and return int. PR ada/71317 * s-osinte-rtems.ads (clock_getres): Define. (Get_Page_Size): Remove duplicate and return int. From-SVN: r236938 --- gcc/ada/ChangeLog | 11 +++++++++++ gcc/ada/s-osinte-kfreebsd-gnu.ads | 10 +++++++--- gcc/ada/s-osinte-rtems.ads | 10 +++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 525b89f9c6e..3af8ec37adc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2016-05-31 Eric Botcazou + + * s-osinte-kfreebsd-gnu.ads (clock_getres): Define. + (Get_Page_Size): Remove duplicate and return int. + +2016-05-31 Jan Sommer + + PR ada/71317 + * s-osinte-rtems.ads (clock_getres): Define. + (Get_Page_Size): Remove duplicate and return int. + 2016-05-20 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : diff --git a/gcc/ada/s-osinte-kfreebsd-gnu.ads b/gcc/ada/s-osinte-kfreebsd-gnu.ads index 3f6ef9bb409..647778bb053 100644 --- a/gcc/ada/s-osinte-kfreebsd-gnu.ads +++ b/gcc/ada/s-osinte-kfreebsd-gnu.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2016, Free Software Foundation, Inc. -- -- -- -- GNAT 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- -- @@ -216,6 +216,11 @@ package System.OS_Interface is return int; pragma Import (C, clock_gettime, "clock_gettime"); + function clock_getres + (clock_id : clockid_t; + res : access timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + function To_Duration (TS : timespec) return Duration; pragma Inline (To_Duration); @@ -330,8 +335,7 @@ package System.OS_Interface is -- returns the stack base of the specified thread. Only call this function -- when Stack_Base_Available is True. - function Get_Page_Size return size_t; - function Get_Page_Size return Address; + function Get_Page_Size return int; pragma Import (C, Get_Page_Size, "getpagesize"); -- Returns the size of a page diff --git a/gcc/ada/s-osinte-rtems.ads b/gcc/ada/s-osinte-rtems.ads index 5a143cc666a..a658bbe8b0d 100644 --- a/gcc/ada/s-osinte-rtems.ads +++ b/gcc/ada/s-osinte-rtems.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2011 Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2016 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- -- @@ -188,6 +188,11 @@ package System.OS_Interface is tp : access timespec) return int; pragma Import (C, clock_gettime, "clock_gettime"); + function clock_getres + (clock_id : clockid_t; + res : access timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + function To_Duration (TS : timespec) return Duration; pragma Inline (To_Duration); @@ -291,8 +296,7 @@ package System.OS_Interface is -- These two functions are only needed to share s-taprop.adb with -- FSU threads. - function Get_Page_Size return size_t; - function Get_Page_Size return Address; + function Get_Page_Size return int; pragma Import (C, Get_Page_Size, "getpagesize"); -- Returns the size of a page -- 2.30.2