diff options
author | Vincent Celier <celier@adacore.com> | 2008-07-31 14:46:11 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-07-31 14:46:11 +0200 |
commit | 67d7b0ab5ffd3d67e804732cdb74299300db18b6 (patch) | |
tree | be4a685531bc427c3de29888c6c01be1c0ac1fc4 | |
parent | 9cc98b79b15ef60e862ac41c61f2573efb56d6bc (diff) | |
download | gcc-67d7b0ab5ffd3d67e804732cdb74299300db18b6.zip gcc-67d7b0ab5ffd3d67e804732cdb74299300db18b6.tar.gz gcc-67d7b0ab5ffd3d67e804732cdb74299300db18b6.tar.bz2 |
makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails...
2008-07-31 Vincent Celier <celier@adacore.com>
* makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails,
return the empty string, instead of raising Constraint_Error.
From-SVN: r138398
-rw-r--r-- | gcc/ada/makeutl.adb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb index 1755ade..a0a909d 100644 --- a/gcc/ada/makeutl.adb +++ b/gcc/ada/makeutl.adb @@ -246,7 +246,17 @@ package body Makeutl is -- If we get here, the user has typed the executable name with no -- directory prefix. - return Get_Install_Dir (Locate_Exec_On_Path (Exec_Name).all); + declare + Path : constant String_Access := Locate_Exec_On_Path (Exec_Name); + + begin + if Path = null then + return ""; + + else + return Get_Install_Dir (Path.all); + end if; + end; end Executable_Prefix_Path; ---------- |