1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- M L I B . T G T . V M S --
9 -- Copyright (C) 2003-2007, Free Software Foundation, Inc. --
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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 -- This is the part of MLib.Tgt.Specific common to both VMS versions
28 package body MLib.Tgt.VMS is
30 -- Non default subprograms. See comments in mlib-tgt.ads
32 function Archive_Ext return String;
34 function Default_Symbol_File_Name return String;
36 function DLL_Ext return String;
38 function Is_Object_Ext (Ext : String) return Boolean;
40 function Is_Archive_Ext (Ext : String) return Boolean;
42 function Libgnat return String;
44 function Object_Ext return String;
46 function Library_Major_Minor_Id_Supported return Boolean;
48 function PIC_Option return String;
54 function Archive_Ext return String is
59 ------------------------------
60 -- Default_Symbol_File_Name --
61 ------------------------------
63 function Default_Symbol_File_Name return String is
66 end Default_Symbol_File_Name;
72 function DLL_Ext return String is
81 function Is_Object_Ext (Ext : String) return Boolean is
90 function Is_Archive_Ext (Ext : String) return Boolean is
92 return Ext = ".olb" or else Ext = ".exe";
99 function Libgnat return String is
100 Libgnat_A : constant String := "libgnat.a";
101 Libgnat_Olb : constant String := "libgnat.olb";
104 Name_Len := Libgnat_A'Length;
105 Name_Buffer (1 .. Name_Len) := Libgnat_A;
107 if Osint.Find_File (Name_Enter, Osint.Library) /= No_File then
114 --------------------------------------
115 -- Library_Major_Minor_Id_Supported --
116 --------------------------------------
118 function Library_Major_Minor_Id_Supported return Boolean is
121 end Library_Major_Minor_Id_Supported;
127 function Object_Ext return String is
136 function PIC_Option return String is
141 -- Package initialization
144 Archive_Ext_Ptr := Archive_Ext'Access;
145 Default_Symbol_File_Name_Ptr := Default_Symbol_File_Name'Access;
146 DLL_Ext_Ptr := DLL_Ext'Access;
147 Is_Object_Ext_Ptr := Is_Object_Ext'Access;
148 Is_Archive_Ext_Ptr := Is_Archive_Ext'Access;
149 Libgnat_Ptr := Libgnat'Access;
150 Object_Ext_Ptr := Object_Ext'Access;
151 PIC_Option_Ptr := PIC_Option'Access;
152 Library_Major_Minor_Id_Supported_Ptr :=
153 Library_Major_Minor_Id_Supported'Access;