From: Vincent Celier Date: Thu, 31 Jul 2008 12:46:11 +0000 (+0200) Subject: makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails... X-Git-Tag: releases/gcc-4.4.0~3569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d7b0ab5ffd3d67e804732cdb74299300db18b6;p=thirdparty%2Fgcc.git makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails... 2008-07-31 Vincent Celier * makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails, return the empty string, instead of raising Constraint_Error. From-SVN: r138398 --- diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb index 1755ade229cf..a0a909d1ae7d 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; ----------