mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:30:29 +08:00
(choose_temp_base): Don't dump core if TMPDIR is empty.
From-SVN: r13263
This commit is contained in:
parent
bd8c4b14b5
commit
df6ddd7337
@ -125,14 +125,13 @@ choose_temp_base ()
|
||||
#endif
|
||||
|
||||
len = strlen (base);
|
||||
if (len == 0)
|
||||
abort ();
|
||||
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
|
||||
+ strlen (TEMP_FILE) + 1);
|
||||
strcpy (temp_filename, base);
|
||||
|
||||
#ifndef MPW
|
||||
if (temp_filename[len-1] != '/'
|
||||
if (len != 0
|
||||
&& temp_filename[len-1] != '/'
|
||||
&& temp_filename[len-1] != DIR_SEPARATOR)
|
||||
temp_filename[len++] = DIR_SEPARATOR;
|
||||
#else /* MPW */
|
||||
|
Loading…
x
Reference in New Issue
Block a user