summaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-20 06:14:53 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-20 06:14:53 +0000
commit17b80c08ecff239bdb1ab5b10ad6d98819d67791 (patch)
treea03bfc505ec1118b3947c2fbbf52975e90cc2d08 /gcc/cppinit.c
parent312866af43c7d34fa7b50f97f20058108888e844 (diff)
downloadgcc-17b80c08ecff239bdb1ab5b10ad6d98819d67791.tar.gz
* cppinit.c (init_standard_includes): The returned buffer
is already malloc-ed. * gcc.c (add_prefix): Similarly. * prefix.c (translate_name): Update to support clear buffer ownership rules. (update_path): Similarly. Be sure to free any newly allocated key. UPDATE_PATH_HOST_CANONICALIZE takes only one argument. (tr): New function. * prefix.h (update_path): Update prototype and document. * config/i386/xm-djgpp.h (UPDATE_PATH_HOST_CANONICALIZE): Clean up and update to new buffer ownership rules. * doc/gcc.texi (UPDATE_PATH_HOST_CANONICALIZE): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45043 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 0b47abea185..4a78a938987 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -861,7 +861,7 @@ init_standard_includes (pfile)
|| (CPP_OPTION (pfile, cplusplus)
&& !CPP_OPTION (pfile, no_standard_cplusplus_includes)))
{
- char *str = xstrdup (update_path (p->fname, p->component));
+ char *str = update_path (p->fname, p->component);
append_include_chain (pfile, str, SYSTEM, p->cxx_aware);
}
}