From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,eda9cd0ad906c54b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!newsfeed3.funet.fi!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!not-for-mail From: Dirk Heinrichs Subject: Re: How to get pathname of executable Newsgroups: comp.lang.ada References: <4d4f4$439ee80e$49955ab$26123@ALLTEL.NET> Organization: Capgemini Deutschland GmbH User-Agent: KNode/0.10 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Message-ID: Date: Tue, 13 Dec 2005 15:57:17 GMT NNTP-Posting-Host: 172.25.104.26 X-Complaints-To: newsmaster@nokia.com X-Trace: news1.nokia.com 1134489437 172.25.104.26 (Tue, 13 Dec 2005 17:57:17 EET) NNTP-Posting-Date: Tue, 13 Dec 2005 17:57:17 EET Xref: g2news1.google.com comp.lang.ada:6864 Date: 2005-12-13T15:57:17+00:00 List-Id: Marc A. Criley wrote: > Dirk Heinrichs wrote: >> I'm trying to find out how to get the complete pathname of an ada >> executable on Linux. I already tried Ada.Command_Line.Command_Name, but >> that only gives the executable's name as the user typed it. I want to >> find out where it is stored in the filesystem so that it can load other >> files from directories relative to its own directory. > > If you don't mind using vendor-supplied packages, and you're using GNAT, > look at GNAT.OS_Lib.Normalize_Pathname(). Using this in combination with > knowing what your current directory is, and/or > GNAT.OS_Lib.Locate_Exec_On_Path() (if that might be needed), you can get > that path. That's what I was looking for. Thanx... Dirk -- Dirk Heinrichs | Tel: +49 (0)162 234 3408 Configuration Manager | Fax: +49 (0)211 47068 111 Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com Hambornerstra�e 55 | Web: http://www.capgemini.com D-40472 D�sseldorf | ICQ#: 110037733 GPG Public Key C2E467BB | Keyserver: www.keyserver.net