summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-12-05 18:09:31 +0000
committerPaul Smith <psmith@gnu.org>2004-12-05 18:09:31 +0000
commit6c2179059550ac8e9db87c119bc01b8b2959d2ff (patch)
treee5a68db6fa6625753a80e28ce3dbe5f0b9f4eec8 /main.c
parent6c9e53d64804a856580876f2019ce4ea1e42b4e0 (diff)
downloadgunmake-6c2179059550ac8e9db87c119bc01b8b2959d2ff.tar.gz
Fix bug with SHELL handling: make sure the variable struct is initialized.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 763fd54..1086908 100644
--- a/main.c
+++ b/main.c
@@ -266,7 +266,7 @@ int rebuilding_makefiles = 0;
/* Remember the original value of the SHELL variable, from the environment. */
-const char *env_shell = 0;
+struct variable shell_var;
/* The usage output. We write it this way to make life easier for the
@@ -1084,7 +1084,8 @@ main (int argc, char **argv, char **envp)
if (strncmp (envp[i], "SHELL=", 6) == 0)
{
v->export = v_noexport;
- env_shell = xstrdup (ep + 1);
+ shell_var.name = "SHELL";
+ shell_var.value = xstrdup (ep + 1);
}
}
}