delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/05/03:42:52

Date: Fri, 5 Jun 1998 10:42:21 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
cc: Josh Rubin <jlrubin AT bway DOT net>, djgpp AT delorie DOT com,
Andris Pavenis <pavenis AT lanet DOT lv>, pavenis AT lanet DOT lv
Subject: Re: Possible cause for "gcc just hangs"
In-Reply-To: <m0yhh0i-000S3EC@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.980605103542.4137E-100000@is>
MIME-Version: 1.0

On Thu, 4 Jun 1998, Salvador Eduardo Tropea (SET) wrote:

> so now I simply try to figure out where is the directory just using the 
> argv[0].

This is a very good solution, used by other packages as well.  (See the 
TeX-related programs, for one example.)  However, it has a small but nasty 
pitfall: argv[0] is always the short 8+3 path, even if you run on Windows 
9X.  This might not be a problem at all if you only need to access a file 
using that path, but if you use argv[0] to compare it to some other file 
name, you might think they aren't the same if the other file name is long.

I don't know if this is a problem in the current context.  If it is, a 
call to _truename should solve it, but _truename might return remote files 
in the UNC-style \\SERVER\SHARE\FOO form, and you then need to convert it 
to the normal d:/foo/bar form.  (Yes, the DJGPP port of TeX does all 
that.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019