summaryrefslogtreecommitdiffstats
path: root/gcc/ada/s-osprim.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-osprim.ads')
-rw-r--r--gcc/ada/s-osprim.ads12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/s-osprim.ads b/gcc/ada/s-osprim.ads
index 381dd5eb5fa..76cebb5ad20 100644
--- a/gcc/ada/s-osprim.ads
+++ b/gcc/ada/s-osprim.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2001 Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2003 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- --
@@ -27,7 +27,7 @@
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
@@ -41,13 +41,17 @@
package System.OS_Primitives is
- Max_Sensible_Delay : constant Duration := 183 * 24 * 60 * 60.0;
+ Max_Sensible_Delay : constant Duration :=
+ Duration'Min (183 * 24 * 60 * 60.0,
+ Duration'Last);
-- Max of half a year delay, needed to prevent exceptions for large
-- delay values. It seems unlikely that any test will notice this
-- restriction, except in the case of applications setting the clock at
-- at run time (see s-tastim.adb). Also note that a larger value might
-- cause problems (e.g overflow, or more likely OS limitation in the
- -- primitives used).
+ -- primitives used). In the case where half a year is too long (which
+ -- occurs in high integrity mode with 32-bit words, and possibly on
+ -- some specific ports of GNAT), Duration'Last is used instead.
function Clock return Duration;
pragma Inline (Clock);
OpenPOWER on IntegriCloud