Date: Mon, 30 Aug 1999 09:41:16 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Laurynas Biveinis cc: DJGPP Workers Subject: Re: symlink() & is_v2_prog() question In-Reply-To: <37C3E95E.1CDBF58D@softhome.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 25 Aug 1999, Laurynas Biveinis wrote: > > -1 means that the file doesn't exist. It is perfectly valid to create a > > Or the file exists, but is not recognized executable : > > is_v2_prog("c:/djgpp/bin/gcc.exe") returns 1, > is_v2_prog("c:/command.com") returns -1, > is_v2_prog("c:/notexist.exe") returns -1, > is_v2_prog("c:/config.sys") returns 0. In the context of the current implementation of `symlink', which only supports DJGPP executable programs, a file that exists but isn't a DJGPP program is the same as a non-existent file: the simulated symlink won't work unless someone creates its target that is a valid DJGPP program. I agree that this might look like a bug, but it is hard to decide what exactly to do in this case, because both possibilities might sometimes be correct and sometimes not. So the current implementation is not ncessarily in error. Of course, if `symlink' is going to support any type of file, then this should be reconsidered and maybe changed. The decision depends, among other factors, on whether the symlink for a DJGPP executable will still be created like it is done today (i.e., by stubediting an empty stub), or perhaps it will use the general mechanism like the other files.