Date: Fri, 5 Jun 1998 10:42:21 +0300 (IDT) From: Eli Zaretskii To: "Salvador Eduardo Tropea (SET)" cc: Josh Rubin , djgpp AT delorie DOT com, Andris Pavenis , pavenis AT lanet DOT lv Subject: Re: Possible cause for "gcc just hangs" In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)