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 2, 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 COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 -- This is the part of MLib.Tgt.Specific common to both VMS versions
29 package body MLib.Tgt.VMS is
31 -- Non default subprograms. See comments in mlib-tgt.ads
33 function Archive_Ext return String;
35 function Default_Symbol_File_Name return String;
37 function DLL_Ext return String;
39 function Is_Object_Ext (Ext : String) return Boolean;
41 function Is_Archive_Ext (Ext : String) return Boolean;
43 function Libgnat return String;
45 function Object_Ext return String;
47 function Library_Major_Minor_Id_Supported return Boolean;
49 function PIC_Option return String;
55 function Archive_Ext return String is
60 ------------------------------
61 -- Default_Symbol_File_Name --
62 ------------------------------
64 function Default_Symbol_File_Name return String is
67 end Default_Symbol_File_Name;
73 function DLL_Ext return String is
82 function Is_Object_Ext (Ext : String) return Boolean is
91 function Is_Archive_Ext (Ext : String) return Boolean is
93 return Ext = ".olb" or else Ext = ".exe";
100 function Libgnat return String is
101 Libgnat_A : constant String := "libgnat.a";
102 Libgnat_Olb : constant String := "libgnat.olb";
105 Name_Len := Libgnat_A'Length;
106 Name_Buffer (1 .. Name_Len) := Libgnat_A;
108 if Osint.Find_File (Name_Enter, Osint.Library) /= No_File then
115 --------------------------------------
116 -- Library_Major_Minor_Id_Supported --
117 --------------------------------------
119 function Library_Major_Minor_Id_Supported return Boolean is
122 end Library_Major_Minor_Id_Supported;
128 function Object_Ext return String is
137 function PIC_Option return String is
142 -- Package initialization
145 Archive_Ext_Ptr := Archive_Ext'Access;
146 Default_Symbol_File_Name_Ptr := Default_Symbol_File_Name'Access;
147 DLL_Ext_Ptr := DLL_Ext'Access;
148 Is_Object_Ext_Ptr := Is_Object_Ext'Access;
149 Is_Archive_Ext_Ptr := Is_Archive_Ext'Access;
150 Libgnat_Ptr := Libgnat'Access;
151 Object_Ext_Ptr := Object_Ext'Access;
152 PIC_Option_Ptr := PIC_Option'Access;
153 Library_Major_Minor_Id_Supported_Ptr :=
154 Library_Major_Minor_Id_Supported'Access;