Patchwork [Ada] Switches for truncated file name on VMS

login
register
mail settings
Submitter Arnaud Charlet
Date Oct. 18, 2010, 2:06 p.m.
Message ID <20101018140617.GA9692@adacore.com>
Download mbox | patch
Permalink /patch/68195/
State New
Headers show

Comments

Arnaud Charlet - Oct. 18, 2010, 2:06 p.m.
On VMS, where the file names are case insensitive, if the spec and body
suffixes in the naming scheme are in upper case, if a truncated file name
(no suffix) is used to specify some switches, the file is not found and
its switches are then incorrect.
The test for that is to specify on VMS a naming scheme such as "_.ADA"
and ".ADA" and Linker switches for the truncated main file name. The
specified switches should be used to link the main.

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-10-18  Vincent Celier  <celier@adacore.com>

	* make.adb (Switches_Of): Put the spec and body suffix in canonical
	case.

Patch

Index: make.adb
===================================================================
--- make.adb	(revision 165610)
+++ make.adb	(working copy)
@@ -8464,13 +8464,13 @@  package body Make is
             Naming      : Lang_Naming_Data renames Lang.Config.Naming_Data;
             Name        : String (1 .. Source_File_Name'Length + 3);
             Last        : Positive := Source_File_Name'Length;
-            Spec_Suffix : constant String :=
-                            Get_Name_String (Naming.Spec_Suffix);
-            Body_Suffix : constant String :=
-                            Get_Name_String (Naming.Body_Suffix);
-            Truncated   : Boolean := False;
+            Spec_Suffix : String   := Get_Name_String (Naming.Spec_Suffix);
+            Body_Suffix : String   := Get_Name_String (Naming.Body_Suffix);
+            Truncated   : Boolean  := False;
 
          begin
+            Canonical_Case_File_Name (Spec_Suffix);
+            Canonical_Case_File_Name (Body_Suffix);
             Name (1 .. Last) := Source_File_Name;
 
             if Last > Body_Suffix'Length