summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-05 19:11:22 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-05 19:11:22 +0000
commit7bcdc3c72acd322469e7e757bd44f03072a93459 (patch)
treef98dde49db8ef6f1d425e196eb7db84dab10c8b4 /gcc/cpplib.c
parent34f474122add99e4b033b875f2a2574dbd11e884 (diff)
downloadppe42-gcc-7bcdc3c72acd322469e7e757bd44f03072a93459.tar.gz
ppe42-gcc-7bcdc3c72acd322469e7e757bd44f03072a93459.zip
* Makefile.in (gcc.o, prefix.o, cccp.o, cpplib.o): Depend on prefix.h.
* cccp.c: Include prefix.h, don't prototype prefix.c functions. (new_include_prefix): Constify char* parameters. * cppfiles.c (read_name_map): Likewise. (append_include_chain): Likewise. Also, use a writable char* copy of parameter `dir' which we then modify, rather than using the parameter itself to store the new writable string. (remap_filename): Constify some variables. Also, use a writable char* to store an allocated string which we will be modifying. * cpplib.c: Include prefix.h, don't prototype prefix.c functions. (cpp_start_read): Constify variable `str'. * cpplib.h (append_include_chain): Constify a char* parameter. * gcc.c Include prefix.h, don't prototype prefix.c functions. (add_prefix, save_string): Constify char* parameters. (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. * prefix.c: Include prefix.h. (get_key_value, translate_name, save_string, update_path, set_std_prefix): Constify various char* parameters and variables. (save_string): Use xmalloc, not malloc. (translate_name): Use a writable temporary variable to create and modify a string before setting it to a const char*. * prefix.h: New file to prototype functions exported from prefix.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24498 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index f9990c85125..50187026d18 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -38,13 +38,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cpplib.h"
#include "cpphash.h"
#include "output.h"
+#include "prefix.h"
#ifndef GET_ENV_PATH_LIST
#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
#endif
-extern char *update_path PARAMS ((char *, char *));
-
/* By default, colon separates directories in a path. */
#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
@@ -4942,7 +4941,7 @@ cpp_start_read (pfile, fname)
/* Some standard dirs are only for C++. */
if (!p->cplusplus
|| (opts->cplusplus && !opts->no_standard_cplusplus_includes)) {
- char *str = update_path (p->fname, p->component);
+ const char *str = update_path (p->fname, p->component);
append_include_chain (pfile, &opts->system_include,
str, !p->cxx_aware);
}
OpenPOWER on IntegriCloud