File : s-stalib-raven.adb
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S Y S T E M . S T A N D A R D _ L I B R A R Y --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2003-2011, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- --
19 -- --
20 -- --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- The purpose of this body is simply to ensure that the two with'ed units
33 -- are properly included in the link. They are not with'ed from the spec
34 -- of System.Standard_Library, since this would cause order of elaboration
35 -- problems (Elaborate_Body would have the same problem).
36
37 pragma Warnings (Off);
38 -- Suppress warnings on context clauses used to include units in
39 -- application closure.
40
41 with System.Memory;
42 -- For __gnat_malloc
43
44 pragma Warnings (On);
45
46 with System.Soft_Links;
47 -- Referenced directly from generated code using external symbols so it
48 -- must always be present in a build, even if no unit has a direct with
49 -- of this unit. Also referenced from exception handling routines.
50 -- This is needed for programs that don't use exceptions explicitly but
51 -- direct calls to Ada.Exceptions are generated by gigi (for example,
52 -- by calling __gnat_raise_constraint_error directly).
53
54 package body System.Standard_Library is
55
56 Runtime_Finalized : Boolean := False;
57 -- Set to True when adafinal is called. Used to ensure that subsequent
58 -- calls to adafinal after the first have no effect.
59
60 --------------
61 -- Adafinal --
62 --------------
63
64 procedure Adafinal is
65 begin
66 if not Runtime_Finalized then
67 Runtime_Finalized := True;
68 System.Soft_Links.Adafinal.all;
69 end if;
70 end Adafinal;
71
72 end System.Standard_Library;