diff mbox series

[COMMITTED,3/9] ada: Use fully qualified in the runtime library

Message ID 20240806090241.576862-3-poulhies@adacore.com
State New
Headers show
Series [COMMITTED,1/9] ada: Reject use-clause conflicts in the run-time library | expand

Commit Message

Marc Poulhiès Aug. 6, 2024, 9:02 a.m. UTC
From: Viljar Indus <indus@adacore.com>

gcc/ada/

	* libgnarl/s-taprop__mingw.adb: Use fully qualified names
	to avoid ambiguity.
	* libgnarl/s-taprop__posix.adb: Likewise.
	* libgnarl/s-taprop__qnx.adb: Likewise.
	* libgnarl/s-taprop__rtems.adb: Likewise.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/libgnarl/s-taprop__mingw.adb |  2 +-
 gcc/ada/libgnarl/s-taprop__posix.adb |  2 +-
 gcc/ada/libgnarl/s-taprop__qnx.adb   | 16 ++++++++--------
 gcc/ada/libgnarl/s-taprop__rtems.adb |  4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/libgnarl/s-taprop__mingw.adb b/gcc/ada/libgnarl/s-taprop__mingw.adb
index f77d71970b8..8c7f59f1c5d 100644
--- a/gcc/ada/libgnarl/s-taprop__mingw.adb
+++ b/gcc/ada/libgnarl/s-taprop__mingw.adb
@@ -1035,7 +1035,7 @@  package body System.Task_Primitives.Operations is
    -------------------
 
    function RT_Resolution return Duration is
-      Ticks_Per_Second : aliased LARGE_INTEGER;
+      Ticks_Per_Second : aliased System.OS_Interface.LARGE_INTEGER;
    begin
       QueryPerformanceFrequency (Ticks_Per_Second'Access);
       return Duration (1.0 / Ticks_Per_Second);
diff --git a/gcc/ada/libgnarl/s-taprop__posix.adb b/gcc/ada/libgnarl/s-taprop__posix.adb
index fb70aaf4976..3d76679ad4a 100644
--- a/gcc/ada/libgnarl/s-taprop__posix.adb
+++ b/gcc/ada/libgnarl/s-taprop__posix.adb
@@ -209,7 +209,7 @@  package body System.Task_Primitives.Operations is
      new Ada.Unchecked_Conversion (Task_Id, System.Address);
 
    function GNAT_pthread_condattr_setup
-     (attr : access pthread_condattr_t) return int;
+     (attr : access pthread_condattr_t) return Interfaces.C.int;
    pragma Import (C,
      GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
 
diff --git a/gcc/ada/libgnarl/s-taprop__qnx.adb b/gcc/ada/libgnarl/s-taprop__qnx.adb
index f475c05c562..39e6983f438 100644
--- a/gcc/ada/libgnarl/s-taprop__qnx.adb
+++ b/gcc/ada/libgnarl/s-taprop__qnx.adb
@@ -119,7 +119,7 @@  package body System.Task_Primitives.Operations is
 
    function Initialize_Lock
      (L    : not null access RTS_Lock;
-      Prio : Any_Priority) return int;
+      Prio : Any_Priority) return Interfaces.C.int;
    --  Initialize the lock L. If Ceiling_Support is True, then set the ceiling
    --  to Prio. Returns 0 for success, or ENOMEM for out-of-memory.
 
@@ -220,7 +220,7 @@  package body System.Task_Primitives.Operations is
      new Ada.Unchecked_Conversion (Task_Id, System.Address);
 
    function GNAT_pthread_condattr_setup
-     (attr : access pthread_condattr_t) return int;
+     (attr : access pthread_condattr_t) return Interfaces.C.int;
    pragma Import (C,
      GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
 
@@ -333,11 +333,11 @@  package body System.Task_Primitives.Operations is
 
    function Initialize_Lock
      (L    : not null access RTS_Lock;
-      Prio : Any_Priority) return int
+      Prio : Any_Priority) return Interfaces.C.int
    is
       Attributes : aliased pthread_mutexattr_t;
-      Result     : int;
-      Result_2   : aliased int;
+      Result     : Interfaces.C.int;
+      Result_2   : aliased Interfaces.C.int;
 
    begin
       Result := pthread_mutexattr_init (Attributes'Access);
@@ -425,9 +425,9 @@  package body System.Task_Primitives.Operations is
      (L : not null access Lock; Ceiling_Violation : out Boolean)
    is
       Self    : constant pthread_t := pthread_self;
-      Result  : int;
-      Policy  : aliased int;
-      Ceiling : aliased int;
+      Result  : Interfaces.C.int;
+      Policy  : aliased Interfaces.C.int;
+      Ceiling : aliased Interfaces.C.int;
       Sched   : aliased struct_sched_param;
 
    begin
diff --git a/gcc/ada/libgnarl/s-taprop__rtems.adb b/gcc/ada/libgnarl/s-taprop__rtems.adb
index ea8422cb454..0a33c194ec1 100644
--- a/gcc/ada/libgnarl/s-taprop__rtems.adb
+++ b/gcc/ada/libgnarl/s-taprop__rtems.adb
@@ -200,7 +200,7 @@  package body System.Task_Primitives.Operations is
      new Ada.Unchecked_Conversion (Task_Id, System.Address);
 
    function GNAT_pthread_condattr_setup
-     (attr : access pthread_condattr_t) return int;
+     (attr : access pthread_condattr_t) return Interfaces.C.int;
    pragma Import (C,
      GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
 
@@ -304,7 +304,7 @@  package body System.Task_Primitives.Operations is
          Res :=
            mprotect
              (Stack_Base - (Stack_Base mod Page_Size) + Page_Size,
-              size_t (Page_Size),
+              Interfaces.C.size_t (Page_Size),
               prot => (if On then PROT_ON else PROT_OFF));
          pragma Assert (Res = 0);
       end if;