Re: [PATCH] Fix missing/wrong function declaration in s-osinte-rtems.ads (ada/71317)

2016-05-31 Thread Eric Botcazou
> I attached a patch for 5 branch which will only add the
> clock_getres-function.

Thanks, applied too.

-- 
Eric Botcazou


Re: [PATCH] Fix missing/wrong function declaration in s-osinte-rtems.ads (ada/71317)

2016-05-31 Thread Jan Sommer
Am Dienstag, 31. Mai 2016, 21:00:07 CEST schrieb Eric Botcazou:
> > this patch fixes the build failures of recent gnat compiler version for
> > RTEMS targets (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71317).
> > Attached are patches for trunk, gcc-5-branch and gcc-6-branch.
> > I don't have write access to the svn, so if the patches pass the review
> > process please commit them.
> 
> Patches applied on mainline and 6 branch, but not on the 5 branch since the 
> signature of Get_Page_Size is correct there.

Thank you. 
I attached a patch for 5 branch which will only add the clock_getres-function.



Index: gcc/ada/ChangeLog
===
--- gcc/ada/ChangeLog	(Revision 236948)
+++ gcc/ada/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,9 @@
+2016-05-31  Jan Sommer 
+
+	PR ada/71317
+	* s-osinte-rtems.ads: Fix missing/wrong function declarations:
+	Missing: clock_getres
+
 2016-05-06  Eric Botcazou  
 
 	PR ada/70969
Index: gcc/ada/s-osinte-rtems.ads
===
--- gcc/ada/s-osinte-rtems.ads	(Revision 236948)
+++ gcc/ada/s-osinte-rtems.ads	(Arbeitskopie)
@@ -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);
 


Re: [PATCH] Fix missing/wrong function declaration in s-osinte-rtems.ads (ada/71317)

2016-05-31 Thread Eric Botcazou
> this patch fixes the build failures of recent gnat compiler version for
> RTEMS targets (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71317).
> Attached are patches for trunk, gcc-5-branch and gcc-6-branch.
> I don't have write access to the svn, so if the patches pass the review
> process please commit them.

Patches applied on mainline and 6 branch, but not on the 5 branch since the 
signature of Get_Page_Size is correct there.

-- 
Eric Botcazou


[PATCH] Fix missing/wrong function declaration in s-osinte-rtems.ads (ada/71317)

2016-05-27 Thread Jan Sommer
Hello,

this patch fixes the build failures of recent gnat compiler version for RTEMS 
targets (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71317).
Attached are patches for trunk, gcc-5-branch and gcc-6-branch.
I don't have write access to the svn, so if the patches pass the review process 
please commit them.

CC is the maintainer of the RTEMS project in case there are some further 
questions.

Best regards,

   Jan

Index: gcc/ada/ChangeLog
===
--- gcc/ada/ChangeLog	(Revision 236835)
+++ gcc/ada/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+2016-05-27  Jan Sommer 
+
+	PR ada/71317
+	* s-osinte-rtems.ads: Fix missing/wrong function declarations:
+	Missing: clock_getres
+	Wrong:   Get_Page_Size
+
 2016-05-06  Eric Botcazou  
 
 	PR ada/70969
Index: gcc/ada/s-osinte-rtems.ads
===
--- gcc/ada/s-osinte-rtems.ads	(Revision 236835)
+++ gcc/ada/s-osinte-rtems.ads	(Arbeitskopie)
@@ -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
 
Index: gcc/ada/ChangeLog
===
--- gcc/ada/ChangeLog	(Revision 236834)
+++ gcc/ada/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+2016-05-27  Jan Sommer 
+
+	PR ada/71317
+	* s-osinte-rtems.ads: Fix missing/wrong function declarations:
+	Missing: clock_getres
+	Wrong:   Get_Page_Size
+
 2016-05-06  Eric Botcazou  
 
 	PR ada/70969
Index: gcc/ada/s-osinte-rtems.ads
===
--- gcc/ada/s-osinte-rtems.ads	(Revision 236834)
+++ gcc/ada/s-osinte-rtems.ads	(Arbeitskopie)
@@ -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
 
Index: gcc/ada/ChangeLog
===
--- gcc/ada/ChangeLog	(Revision 236834)
+++ gcc/ada/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+2016-05-27  Jan Sommer 
+
+	PR ada/71317
+	* s-osinte-rtems.ads: Fix missing/wrong function declarations:
+	Missing: clock_getres
+	Wrong:   Get_Page_Size
+
 2016-05-20  Eric Botcazou  
 
 	* gcc-interface/decl.c (gnat_to_gnu_entity) :
Index: gcc/ada/s-osinte-rtems.ads
===
--- gcc/ada/s-osinte-rtems.ads	(Revision 236834)
+++ gcc/ada/s-osinte-rtems.ads	(Arbeitskopie)
@@ -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