delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/24/16:15:06

Message-ID: <37C2FC1C.51F4D166@softhome.net>
Date: Tue, 24 Aug 1999 22:10:04 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.61 [en] (Win98; I)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: symlink() & is_v2_prog() question
Reply-To: djgpp-workers AT delorie DOT com

Hello,

I got a little bit confused by current symlink() code. The reason -
symlink() uses helper function is_v2_prog(), which returns 1 for
v2 DJGPP program, 0 for any other program and -1 for anything else.
The main symlink() code calls this function to determine the type
of linked file. And my question is - why symlink() code checks
only for return value 0, and does not handle -1 ?

?  /* It is an existing file but no v2 executable */
?  if (v2_prog == 0)
?  {
?    errno = EXDEV;
?    return -1;
?  }

This looks like a bug for me, but before submitting a patch
I'd like to know, haven't I overlooked something? Are there
any reasons for keeping current code, which e.g. executes silently
symlink("c:/io.sys", "c:/test.exe") and produces not working
test.exe file?

Laurynas Biveinis

- Raw text -


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