From 17b80c08ecff239bdb1ab5b10ad6d98819d67791 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 20 Aug 2001 06:14:53 +0000 Subject: * 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 --- gcc/prefix.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/prefix.h') diff --git a/gcc/prefix.h b/gcc/prefix.h index 03c0d191fc2..b712900cd82 100644 --- a/gcc/prefix.h +++ b/gcc/prefix.h @@ -22,7 +22,10 @@ Boston, MA 02111-1307, USA. */ #ifndef GCC_PREFIX_H #define GCC_PREFIX_H -extern const char *update_path PARAMS ((const char *, const char *)); +/* Update PATH using KEY if PATH starts with PREFIX. The returned + string is always malloc-ed, and the caller is responsible for + freeing it. */ +extern char *update_path PARAMS ((const char *path, const char *key)); extern void set_std_prefix PARAMS ((const char *, int)); #endif /* ! GCC_PREFIX_H */ -- cgit v1.2.1