This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] [Ada] Make clockid_t type public on GNU/kFreeBSD

From: James Clarke <>

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

	* libgnarl/ (clockid_t): Make type
	definition public.
	(CLOCK_REALTIME): Make value public.
 gcc/ada/libgnarl/ | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/libgnarl/ b/gcc/ada/libgnarl/
index 408187314..b60ffd2c0 100644
--- a/gcc/ada/libgnarl/
+++ b/gcc/ada/libgnarl/
@@ -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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]