aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-09-17 22:15:10 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-09-17 22:15:10 +0000
commitc793eea7abb23067e67179546acfea0db28af1ae (patch)
tree8936428e9b92c8d4e4a9fb0979885f8a76664f19 /gcc
parent63fb6fc7f8e0b16439a3fc9db8554450861a2643 (diff)
downloadgcc-c793eea7abb23067e67179546acfea0db28af1ae.zip
gcc-c793eea7abb23067e67179546acfea0db28af1ae.tar.gz
gcc-c793eea7abb23067e67179546acfea0db28af1ae.tar.bz2
libiberty.h (concat_length, [...]): New.
include: * libiberty.h (concat_length, concat_copy, concat_copy2, libiberty_concat_ptr, ACONCAT): New. libiberty: * concat.c (vconcat_length, vconcat_copy, concat_length, concat_copy, concat_copy2): New functions. (concat): Use vconcat_length/vconcat_copy. gcc: * gcc.c (find_file): Use ACONCAT in lieu of alloca/strcpy/strcat. From-SVN: r45664
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gcc.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c66d0d9..1e8d4f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.c (find_file): Use ACONCAT in lieu of alloca/strcpy/strcat.
+
2001-09-17 Joseph S. Myers <jsm28@cam.ac.uk>
* dostage2, dostage3, listing, make-l2.com, makefile.vms,
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 55188cf..ad692eb5b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -5419,12 +5419,7 @@ find_file (name)
/* Try multilib_dir if it is defined. */
if (multilib_dir != NULL)
{
- char *try;
-
- try = (char *) alloca (strlen (multilib_dir) + strlen (name) + 2);
- strcpy (try, multilib_dir);
- strcat (try, dir_separator_str);
- strcat (try, name);
+ const char *const try = ACONCAT ((multilib_dir, dir_separator_str, name, NULL));
newname = find_a_file (&startfile_prefixes, try, R_OK);