summaryrefslogtreecommitdiff
path: root/default.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2014-04-25 17:10:47 -0400
committerPaul Smith <psmith@gnu.org>2014-07-07 01:59:03 -0400
commitac67346d0fb5e5ea359d34c2c9215bd1892455f3 (patch)
tree5e6c7f534a34aa90f3da9b522cfa31ab4181b3d3 /default.c
parente364498113e145b5ac424325e3903cc2287d7e7f (diff)
downloadgunmake-ac67346d0fb5e5ea359d34c2c9215bd1892455f3.tar.gz
* maintMakefile, various: Improve constification of the codebase.
Diffstat (limited to 'default.c')
-rw-r--r--default.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/default.c b/default.c
index d6c08a5..48b899d 100644
--- a/default.c
+++ b/default.c
@@ -108,7 +108,7 @@ static struct pspec default_terminal_rules[] =
{ 0, 0, 0 }
};
-static char *default_suffix_rules[] =
+static const char *default_suffix_rules[] =
{
#ifdef VMS
".obj.exe",
@@ -548,8 +548,8 @@ set_default_suffixes (void)
else
{
struct dep *d;
- char *p = default_suffixes;
- suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ (&p, struct dep),
+ const char *p = default_suffixes;
+ suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
NULL);
for (d = suffix_file->deps; d; d = d->next)
d->file->builtin = 1;
@@ -566,7 +566,7 @@ set_default_suffixes (void)
void
install_default_suffix_rules (void)
{
- char **s;
+ const char **s;
if (no_builtin_rules_flag)
return;
@@ -578,7 +578,7 @@ install_default_suffix_rules (void)
assert (f->cmds == 0);
f->cmds = xmalloc (sizeof (struct commands));
f->cmds->fileinfo.filenm = 0;
- f->cmds->commands = s[1];
+ f->cmds->commands = xstrdup (s[1]);
f->cmds->command_lines = 0;
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
f->builtin = 1;