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 PIC_Option return String;
53 function Archive_Ext return String is
58 ------------------------------
59 -- Default_Symbol_File_Name --
60 ------------------------------
62 function Default_Symbol_File_Name return String is
65 end Default_Symbol_File_Name;
71 function DLL_Ext return String is
80 function Is_Object_Ext (Ext : String) return Boolean is
89 function Is_Archive_Ext (Ext : String) return Boolean is
91 return Ext = ".olb" or else Ext = ".exe";
98 function Libgnat return String is
99 Libgnat_A : constant String := "libgnat.a";
100 Libgnat_Olb : constant String := "libgnat.olb";
103 Name_Len := Libgnat_A'Length;
104 Name_Buffer (1 .. Name_Len) := Libgnat_A;
106 if Osint.Find_File (Name_Enter, Osint.Library) /= No_File then
117 function Object_Ext return String is
126 function PIC_Option return String is
131 -- Package initialization
134 Archive_Ext_Ptr := Archive_Ext'Access;
135 Default_Symbol_File_Name_Ptr := Default_Symbol_File_Name'Access;
136 DLL_Ext_Ptr := DLL_Ext'Access;
137 Is_Object_Ext_Ptr := Is_Object_Ext'Access;
138 Is_Archive_Ext_Ptr := Is_Archive_Ext'Access;
139 Libgnat_Ptr := Libgnat'Access;
140 Object_Ext_Ptr := Object_Ext'Access;
141 PIC_Option_Ptr := PIC_Option'Access;