From: pavenis AT lanet DOT lv Message-ID: To: djgpp-workers AT delorie DOT com, gcc-bugs AT gcc DOT gnu DOT org Date: Thu, 19 Aug 1999 15:27:06 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Bug in collect2.c X-mailer: Pegasus Mail for Win32 (v3.12) Reply-To: djgpp-workers AT delorie DOT com There is small bug in collect2.c that appears in some conditions when DIR_SEPARATOR_2 is used for example in MS-DOS (target i[34567]6-pc-msdosdjgpp): when in MS-DOS path contains root directory of some drive (eg. C:\) wrong directory prefix is generated as no test is done for DIR_SEPARATOR_2. As result a lookup for something like C:\/ld.exe causes Win9X to wait for rather long time Included patch fixes the problem (patch is against gcc-2.95.1) Andris Pavenis --- collect2.c~1 Mon Jun 21 13:14:48 1999 +++ collect2.c Thu Aug 19 15:01:22 1999 @@ -948,7 +948,11 @@ { strcpy (nstore, "./"); } - else if (endp[-1] != '/') + else if (endp[-1] != '/' +#if defined (DIR_SEPARATOR_2) + && (endp[-1] != DIR_SEPARATOR_2) +#endif + ) { nstore[endp-startp] = '/'; nstore[endp-startp+1] = 0;