Mail Archives: djgpp-workers/2002/06/13/11:10:08
We have again an old bug with creating temporary files in gcc.exe
(gcc-3.1) due to changes in libiberty. Specifying directory name
which ends with directory separator may not work as expected
(thanks antti DOT koskipaa AT edu DOT stadia DOT fi for reporting a problem).
The included patch seems to fix it (perhaps it could also be usefull for
WIndows targets). I'm not sure however that it's required
to rerelease gcc-3.1 for DJGPP as 3.1.1 should be about after slightly more
than a month (according http://gcc.gnu.org/develop.html)
Andris
--- gcc-3.1/libiberty/make-temp-file.c~1 Thu Oct 18 00:15:40 2001
+++ gcc-3.1/libiberty/make-temp-file.c Thu Jun 13 17:06:40 2002
@@ -126,6 +126,9 @@
len = strlen (base);
tmpdir = xmalloc (len + 2);
strcpy (tmpdir, base);
+#ifdef __DJGPP__
+ if (tmpdir[len-1]!='/' && tmpdir[len-1]!='\\')
+#endif
tmpdir[len] = DIR_SEPARATOR;
tmpdir[len+1] = '\0';
- Raw text -