summaryrefslogtreecommitdiff
path: root/default.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
committerPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
commite4da30858037b431880263676e8f90b1f8412a38 (patch)
tree2605109d089f52e373bd976391dca85774ae3b21 /default.c
parent7595f38f62afa7ac3451018d865fb251e3ce91c3 (diff)
downloadgunmake-e4da30858037b431880263676e8f90b1f8412a38.tar.gz
Fix from Eli for incorrect value of $(MAKE) on Cygwin.
A few changes from char* to void* where appropriate, and removing of unnecessary casts. Much more work on const-ifying the codebase. This round involves some code changes to make it correct. NOTE!! There will almost certainly be problems on the non-POSIX ports that will need to be addressed after the const changes are finished: they will need to be const-ified properly and there may need to be some changes to allocate memory, etc. as well. The next (last?) big push for this, still to come, is const-ifying the filenames in struct file, struct dep, etc. This will allow us to store file names in the string cache and finally resolve Savannah bug #15182 (make uses too much memory), among other advantages.
Diffstat (limited to 'default.c')
-rw-r--r--default.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/default.c b/default.c
index ada0a8a..95f5635 100644
--- a/default.c
+++ b/default.c
@@ -302,7 +302,7 @@ static char *default_suffix_rules[] =
0, 0,
};
-static char *default_variables[] =
+static const char *default_variables[] =
{
#ifdef VMS
#ifdef __ALPHA
@@ -544,14 +544,14 @@ set_default_suffixes (void)
void
install_default_suffix_rules (void)
{
- register char **s;
+ char **s;
if (no_builtin_rules_flag)
return;
- for (s = default_suffix_rules; *s != 0; s += 2)
+ for (s = default_suffix_rules; *s != 0; s += 2)
{
- register struct file *f = enter_file (s[0]);
+ struct file *f = enter_file (s[0]);
/* Don't clobber cmds given in a makefile if there were any. */
if (f->cmds == 0)
{
@@ -569,7 +569,7 @@ install_default_suffix_rules (void)
void
install_default_implicit_rules (void)
{
- register struct pspec *p;
+ struct pspec *p;
if (no_builtin_rules_flag)
return;
@@ -584,11 +584,11 @@ install_default_implicit_rules (void)
void
define_default_variables (void)
{
- register char **s;
+ const char **s;
if (no_builtin_variables_flag)
return;
for (s = default_variables; *s != 0; s += 2)
- (void) define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
+ define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
}