This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in collect2.c
- To: djgpp-workers at delorie dot com, gcc-bugs at gcc dot gnu dot org
- Subject: Bug in collect2.c
- From: pavenis at lanet dot lv
- Date: Thu, 19 Aug 1999 15:27:06 +0300
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;