aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-01-05 19:11:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-01-05 19:11:22 +0000
commit460ee1120c62c6c543e8bdfac4ee287e754e3a61 (patch)
treef98dde49db8ef6f1d425e196eb7db84dab10c8b4 /gcc/cccp.c
parent258ce95eb63d074fc9d39d7e1f82316a4fb7874d (diff)
downloadgcc-460ee1120c62c6c543e8bdfac4ee287e754e3a61.zip
gcc-460ee1120c62c6c543e8bdfac4ee287e754e3a61.tar.gz
gcc-460ee1120c62c6c543e8bdfac4ee287e754e3a61.tar.bz2
Makefile.in (gcc.o, [...]): Depend on prefix.h.
* 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. From-SVN: r24498
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 440081c..5271960 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */
typedef unsigned char U_CHAR;
#include "pcp.h"
+#include "prefix.h"
#ifdef MULTIBYTE_CHARS
#include "mbchar.h"
@@ -122,7 +123,6 @@ static int hack_vms_include_specification ();
/* External declarations. */
extern char *version_string;
-extern char *update_path PROTO((char *, char *));
HOST_WIDE_INT parse_escape PROTO((char **, HOST_WIDE_INT));
HOST_WIDE_INT parse_c_expression PROTO((char *, int));
@@ -1029,7 +1029,7 @@ static void make_undef PROTO((char *, FILE_BUF *));
static void make_assertion PROTO((char *, char *));
-static struct file_name_list *new_include_prefix PROTO((struct file_name_list *, char *, char *, char *));
+static struct file_name_list *new_include_prefix PROTO((struct file_name_list *, const char *, const char *, const char *));
static void append_include_chain PROTO((struct file_name_list *, struct file_name_list *));
static int quote_string_for_make PROTO((char *, char *));
@@ -10436,9 +10436,9 @@ make_assertion (option, str)
static struct file_name_list *
new_include_prefix (prev_file_name, component, prefix, name)
struct file_name_list *prev_file_name;
- char *component;
- char *prefix;
- char *name;
+ const char *component;
+ const char *prefix;
+ const char *name;
{
if (name == 0)
fatal ("Directory name missing after command line option");