delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/13/11:10:08

From: pavenis AT lanet DOT lv
To: djgpp-workers AT delorie DOT com
Date: Thu, 13 Jun 2002 17:33:07 +0300
MIME-Version: 1.0
Subject: gcc-3.1: old problem with temporary files
Message-ID: <3D08D753.9898.186F2D1@localhost>
X-mailer: Pegasus Mail for Windows (v4.01)
Reply-To: djgpp-workers AT delorie DOT com

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 -


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