summaryrefslogtreecommitdiff
path: root/gcc/ada/s-stache.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-15 11:51:01 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-15 11:51:01 +0000
commit9e0ecfab1d8fa100f78d23060cd15b5c34a449a7 (patch)
tree1a02b34983bc3ac002967364fb841e53d5f9fc47 /gcc/ada/s-stache.adb
parentc974e0ffe8c1ecfaafef45dc8a723120fbe469ee (diff)
downloadgcc-9e0ecfab1d8fa100f78d23060cd15b5c34a449a7.tar.gz
2003-12-15 Robert Dewar <dewar@gnat.com>
* exp_ch6.adb (Expand_Thread_Body): Fix error in picking up default sec stack size. 2003-12-15 Vincent Celier <celier@gnat.com> * gnatchop.adb: (Error_Msg): Do not exit on error for a warning (Gnatchop): Do not set failure status when reporting the number of warnings. 2003-12-15 Doug Rupp <rupp@gnat.com> * s-ctrl.ads: New file. * Makefile.rtl (GNAT_RTL_NONTASKING_OBJS): Add s-crtl$(objext). * Make-lang.in: (GNAT_ADA_OBJS): Add ada/s-crtl.o. (GNATBIND_OBJS): Add ada/s-crtl.o. * Makefile.in [VMS]: Clean up ifeq rules. * gnatlink.adb, 6vcstrea.adb, a-direio.adb, a-sequio.adb, a-ststio.adb, a-textio.adb, g-os_lib.adb, a-witeio.adb, g-os_lib.ads, i-cstrea.adb, i-cstrea.ads, s-direio.adb, s-fileio.adb, s-memcop.ads, s-memory.adb, s-stache.adb, s-tasdeb.adb: Update copyright. Import System.CRTL. Make minor modifications to use System.CRTL declared functions instead of importing locally. 2003-12-15 GNAT Script <nobody@gnat.com> * Make-lang.in: Makefile automatically updated git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-stache.adb')
-rw-r--r--gcc/ada/s-stache.adb23
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/ada/s-stache.adb b/gcc/ada/s-stache.adb
index 65e816b654f..aa403c3f988 100644
--- a/gcc/ada/s-stache.adb
+++ b/gcc/ada/s-stache.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2002 Free Software Foundation, Inc. --
+-- Copyright (C) 1999-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- --
@@ -36,6 +36,7 @@ with Ada.Exceptions;
with System.Storage_Elements; use System.Storage_Elements;
with System.Parameters; use System.Parameters;
with System.Soft_Links;
+with System.CRTL;
package body System.Stack_Checking is
@@ -72,7 +73,6 @@ package body System.Stack_Checking is
procedure Invalidate_Stack_Cache (Any_Stack : Stack_Access) is
pragma Warnings (Off, Any_Stack);
-
begin
Cache := Null_Stack;
end Invalidate_Stack_Cache;
@@ -82,8 +82,7 @@ package body System.Stack_Checking is
--------------------
function Set_Stack_Info
- (Stack : access Stack_Access)
- return Stack_Access
+ (Stack : access Stack_Access) return Stack_Access
is
type Frame_Mark is null record;
Frame_Location : Frame_Mark;
@@ -93,12 +92,6 @@ package body System.Stack_Checking is
Limit_Chars : System.Address;
Limit : Integer;
- function getenv (S : String) return System.Address;
- pragma Import (C, getenv, External_Name => "getenv");
-
- function atoi (A : System.Address) return Integer;
- pragma Import (C, atoi);
-
begin
-- The order of steps 1 .. 3 is important, see specification.
@@ -113,16 +106,16 @@ package body System.Stack_Checking is
-- the current frame address.
if My_Stack.Size = 0 then
-
My_Stack.Size := Storage_Offset (Default_Env_Stack_Size);
-- When the environment variable GNAT_STACK_LIMIT is set,
-- set Environment_Stack_Size to that number of kB.
- Limit_Chars := getenv ("GNAT_STACK_LIMIT" & ASCII.NUL);
+ Limit_Chars := System.CRTL.getenv ("GNAT_STACK_LIMIT" & ASCII.NUL);
if Limit_Chars /= Null_Address then
- Limit := atoi (Limit_Chars);
+ Limit := System.CRTL.atoi (Limit_Chars);
+
if Limit >= 0 then
My_Stack.Size := Storage_Offset (Limit) * Kilobyte;
end if;
@@ -192,8 +185,7 @@ package body System.Stack_Checking is
-----------------
function Stack_Check
- (Stack_Address : System.Address)
- return Stack_Access
+ (Stack_Address : System.Address) return Stack_Access
is
type Frame_Marker is null record;
Marker : Frame_Marker;
@@ -227,7 +219,6 @@ package body System.Stack_Checking is
-- it is essential to use our local copy of Stack!
begin
-
if (Stack_Grows_Down and then
(not (Frame_Address <= My_Stack.Base)))
or else