Message-ID: <37C2FC1C.51F4D166@softhome.net> Date: Tue, 24 Aug 1999 22:10:04 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: lt,en MIME-Version: 1.0 To: DJGPP Workers Subject: symlink() & is_v2_prog() question Content-Type: text/plain; charset=iso-8859-4 Content-Transfer-Encoding: 7bit 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