This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] fix bug in locate_exec_on_path


Tested on i686-linux, committed on trunk.

The comments in the spec of g-os_lib.ads indicate that a "full path" is
returned.
This fix ensures that it is true in all cases.
The test for this is to call any one of these two functions with
a relative path name, starting with "./". It should return an absolute
path name.

On VMS, if we have a Unix path such as /temp/..., and TEMP is a
logical name, we must not try to resolve this logical name, because
it may have multiple equivalences and if resolved we will only
get the first one.

2006-10-31  Vincent Celier  <celier@adacore.com>

	* g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
	absolute path name.
	(Locate_Regular_File): Ditto
	(Change_Dir): Remove, no longer used
	(Normalize_Pathname): Do not use Change_Dir to get the drive letter
	on Windows. Get it calling Get_Current_Dir.
	(OpenVMS): Remove imported boolean, no longer needed.
	(Normalize_Pathname)[VMS]: Do not resolve directory names.
	(Pid_To_Integer): New function to convert a Process_Id to  Integer

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]