@@ -1007,6 +1007,7 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-android.adb \
s-osinte.ads<s-osinte-android.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1021,7 +1022,7 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
indepsw.adb<indepsw-gnu.adb
GNATRTL_SOCKETS_OBJS =
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=
THREADSLIB =
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1086,6 +1087,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(
a-intnam.ads<a-intnam-solaris.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-solaris-posix.ads \
s-osprim.adb<s-osprim-solaris.adb \
@@ -1095,6 +1097,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(
g-soliop.ads<g-soliop-solaris.ads \
system.ads<system-solaris-sparc.ads
+ EXTRA_GNATRTL_TASKING_OBJS=s-ostime.o
THREADSLIB = -lposix4 -lpthread
endif
@@ -1173,6 +1176,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
a-exetim.adb<a-exetim-posix.adb \
a-exetim.ads<a-exetim-default.ads \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
$(ATOMICS_TARGET_PAIRS)
@@ -1210,7 +1214,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
EH_MECHANISM=-gcc
THREADSLIB = -lpthread -lrt
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o s-ostime.o
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
@@ -1228,6 +1232,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
a-intnam.ads<a-intnam-freebsd.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1245,6 +1250,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
@@ -1261,6 +1267,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
a-numaux.ads<a-numaux-x86.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1275,6 +1282,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
+ EXTRA_GNATRTL_TASKING_OBJS=s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1347,6 +1355,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1379,7 +1388,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1412,6 +1421,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(tar
a-intnam.ads<a-intnam-hpux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-hpux.ads \
s-parame.ads<s-parame-hpux.ads \
@@ -1423,6 +1433,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(tar
system.ads<system-hpux.ads
TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
+ EXTRA_GNATRTL_TASKING_OBJS=s-ostime.o
EH_MECHANISM=-gcc
TGT_LIB = /usr/lib/libcl.a
THREADSLIB = -lpthread
@@ -1735,6 +1746,7 @@ ifeq ($(strip $(filter-out mips linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1745,6 +1757,7 @@ ifeq ($(strip $(filter-out mips linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-linux-mips.ads
+ EXTRA_GNATRTL_TASKING_OBJS=s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1759,6 +1772,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux-mipsel.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1787,7 +1801,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1802,6 +1816,7 @@ ifeq ($(strip $(filter-out mips64el linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux-mipsel.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1830,7 +1845,7 @@ ifeq ($(strip $(filter-out mips64el linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1849,6 +1864,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-tpopsp.adb<s-tpopsp-tls.adb \
g-sercom.adb<g-sercom-linux.adb \
@@ -1894,7 +1910,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread -lrt
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1909,6 +1925,7 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1930,7 +1947,7 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1945,6 +1962,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux-sparc.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -1972,7 +1990,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -1987,6 +2005,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux-hppa.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -2001,7 +2020,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB = -lpthread
GNATLIB_SHARED = gnatlib-shared-dual
@@ -2016,6 +2035,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -2030,7 +2050,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-linux.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
MISCLIB=
THREADSLIB = -lpthread
@@ -2051,6 +2071,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-mudido.adb<s-mudido-affinity.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
@@ -2069,7 +2090,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o s-ostime.o
EH_MECHANISM=-gcc
MISCLIB=
THREADSLIB=-lpthread -lrt
@@ -2114,6 +2135,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux-alpha.ads \
+ s-ostime.ads<s-posix-time.ads \
s-osinte.ads<s-osinte-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osprim.adb<s-osprim-posix.adb \
@@ -2130,7 +2152,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o s-ostime.o
EH_MECHANISM=-gcc
MISCLIB=
THREADSLIB=-lpthread
@@ -2149,6 +2171,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time.ads \
s-mudido.adb<s-mudido-affinity.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
@@ -2168,7 +2191,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB=-lpthread -lrt
MISCLIB = -ldl
@@ -2187,6 +2210,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
+ s-ostime.ads<s-posix-time-x32.ads \
s-mudido.adb<s-mudido-affinity.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
@@ -2206,7 +2230,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o s-ostime.o
EH_MECHANISM=-gcc
THREADSLIB=-lpthread -lrt
GNATLIB_SHARED=gnatlib-shared-dual
@@ -42,6 +42,7 @@ with Ada.Unchecked_Conversion;
with Interfaces.C;
with System.Linux;
with System.OS_Constants;
+with System.OS_Time;
package System.OS_Interface is
pragma Preelaborate;
@@ -596,11 +597,11 @@ private
type pid_t is new int;
- type time_t is new long;
+ type time_t is new System.OS_Time.time_t;
type timespec is record
tv_sec : time_t;
- tv_nsec : long;
+ tv_nsec : time_t;
end record;
pragma Convention (C, timespec);
@@ -104,7 +104,7 @@ package body System.OS_Interface is
end if;
return timespec'(tv_sec => S,
- tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
+ tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
end System.OS_Interface;
@@ -31,6 +31,8 @@
-- This version is for POSIX-like operating systems
+with System.OS_Time;
+
package body System.OS_Primitives is
-- ??? These definitions are duplicated from System.OS_Interface
@@ -38,11 +40,11 @@ package body System.OS_Primitives is
-- these declarations in System.OS_Interface and move these ones in
-- the spec.
- type time_t is new Long_Integer;
+ type time_t is new System.OS_Time.time_t;
type timespec is record
tv_sec : time_t;
- tv_nsec : Long_Integer;
+ tv_nsec : time_t;
end record;
pragma Convention (C, timespec);
@@ -54,7 +56,7 @@ package body System.OS_Primitives is
-----------
function Clock return Duration is
- type timeval is array (1 .. 2) of Long_Integer;
+ type timeval is array (1 .. 2) of time_t;
procedure timeval_to_duration
(T : not null access timeval;
@@ -118,7 +120,7 @@ package body System.OS_Primitives is
return
timespec'(tv_sec => S,
- tv_nsec => Long_Integer (Long_Long_Integer (F * 10#1#E9)));
+ tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
-----------------
new file mode 100644
@@ -0,0 +1,44 @@
+------------------------------------------------------------------------------
+-- --
+-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . O S _ T i m e --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2013, 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- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the default version of this package
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+
+package System.OS_Time is
+ pragma Preelaborate;
+
+ ------------
+ -- time_t --
+ ------------
+
+ type time_t is new Long_Long_Integer;
+
+end System.OS_Time;
new file mode 100644
@@ -0,0 +1,44 @@
+------------------------------------------------------------------------------
+-- --
+-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . O S _ T i m e --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2013, 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- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the default version of this package
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+
+package System.OS_Time is
+ pragma Preelaborate;
+
+ ------------
+ -- time_t --
+ ------------
+
+ type time_t is new Long_Integer;
+
+end System.OS_Time;
@@ -46,6 +46,7 @@ with System.Interrupt_Management;
with System.OS_Primitives;
with System.Stack_Checking.Operations;
with System.Multiprocessors;
+with System.OS_Time;
with System.Soft_Links;
-- We use System.Soft_Links instead of System.Tasking.Initialization
@@ -627,7 +628,7 @@ package body System.Task_Primitives.Operations is
function Monotonic_Clock return Duration is
use Interfaces;
- type timeval is array (1 .. 2) of C.long;
+ type timeval is array (1 .. 2) of System.OS_Time.time_t;
procedure timeval_to_duration
(T : not null access timeval;