diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2003-10-24 15:02:42 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2003-10-24 15:02:42 +0200 |
commit | b0f26df5db7c471770e7219881e9bfe85cd3a039 (patch) | |
tree | 897ca34543cba57ab757439fcdd09dd83b34f5e6 /gcc/ada/prj-env.ads | |
parent | bf22935f99c213b406b368ccdbff2572a8d08df0 (diff) | |
download | gcc-b0f26df5db7c471770e7219881e9bfe85cd3a039.tar.gz |
re PR ada/12014 (strcpy used with overlapping arguments)
* adadecode.c (ostrcpy): New function.
(__gnat_decode): Use ostrcpy of strcpy.
(has_prefix): Set first parameter a const.
(has_suffix): Set first parameter a const.
Update copyright notice. Fix source name in header.
Removes a trailing space.
PR ada/12014.
* exp_disp.adb:
Remove the test against being in No_Run_Time_Mode before generating a
call to Register_Tag. It is redundant with the test against the
availability of the function Register_Tag.
* g-catiio.adb: (Month_Name): Correct spelling of February
* make.adb: (Mains): New package
(Initialize): Call Mains.Delete
(Gnatmake): Check that each main on the command line is a source of a
project file and, if there are several mains, each of them is a source
of the same project file.
(Gnatmake): When a foreign language is specified in attribute Languages,
no main is specified on the command line and attribute Mains is not
empty, only build the Ada main. If there is no Ada main, just compile
the Ada sources and their closure.
(Gnatmake): If a main is specified on the command line with directory
information, check that the source exists and, if it does, that the path
is the actual path of a source of a project.
* prj-env.adb:
(File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path. When
Full_Path is True, return the full path instead of the simple file name.
(Project_Of): New function
* prj-env.ads:
(File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path,
defaulted to False.
(Project_Of): New function
* Makefile.generic:
Ensure objects of main project are always checked and rebuilt if needed.
Set CC to gcc by default.
Prepare new handling of link by creating a global archive (not activated
yet).
* adadecode.h, atree.h, elists.h, nlists.h, raise.h,
stringt.h: Update copyright notice. Remove trailing blanks.
Fix source name in header.
* sem_ch12.adb: Minor reformatting
* sem_ch3.adb:
Minor reformatting (including new function return style throughout)
* sem_ch3.ads:
Minor reformatting (including new function return style throughout)
* Make-lang.in: Makefile automatically updated
From-SVN: r72893
Diffstat (limited to 'gcc/ada/prj-env.ads')
-rw-r--r-- | gcc/ada/prj-env.ads | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ada/prj-env.ads b/gcc/ada/prj-env.ads index e03d54afb39..7ea02870198 100644 --- a/gcc/ada/prj-env.ads +++ b/gcc/ada/prj-env.ads @@ -101,17 +101,29 @@ package Prj.Env is function File_Name_Of_Library_Unit_Body (Name : String; Project : Project_Id; - Main_Project_Only : Boolean := True) + Main_Project_Only : Boolean := True; + Full_Path : Boolean := False) return String; -- Returns the file name of a library unit, in canonical case. Name may or -- may not have an extension (corresponding to the naming scheme of the -- project). If there is no body with this name, but there is a spec, the - -- name of the spec is returned. If neither a body or a spec can be found, - -- return an empty string. + -- name of the spec is returned. + -- If Full_Path is False (the default), the simple file name is returned. + -- If Full_Path is True, the absolute path name is returned. + -- If neither a body nor a spec can be found, an empty string is returned. -- If Main_Project_Only is True, the unit must be an immediate source of -- Project. If it is False, it may be a source of one of its imported -- projects. + function Project_Of + (Name : String; + Main_Project : Project_Id) + return Project_Id; + -- Get the project of a source. The source file name may be truncated + -- (".adb" or ".ads" may be missing). If the source is in a project being + -- extended, return the ultimate extending project. If it is not a source + -- of any project, return No_Project. + procedure Get_Reference (Source_File_Name : String; Project : out Project_Id; |