diff options
| author | tim <tim> | 1997-07-01 19:57:16 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:00 +0100 |
| commit | 8a03ed3fc54e728f7ccd2fef40b7215e1d072054 (patch) | |
| tree | 28f49822188154e7930042b6b7ed7894cda9027e | |
| parent | a819960f747a251f4b9d88e3e56f9144318efd71 (diff) | |
autoconf
get consts right in casts
| -rw-r--r-- | exec.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -12,7 +12,8 @@ extern void exec(List *s, bool parent) { char **av, **ev = NULL; - int pid, stat; + int stat; + pid_t pid; builtin_t *b; char *path = NULL; bool didfork, returning, saw_exec, saw_builtin; @@ -91,16 +92,17 @@ extern void exec(List *s, bool parent) { return; rc_exit(getstatus()); } -#ifdef NOEXECVE - my_execve(path, (const char **) av, (const char **) ev); /* bogus, huh? */ +#if HASH_BANG + execve(path, (char * const *) av, (char * const *) ev); #else - execve(path, (const char **) av, (const char **) ev); + my_execve(path, (char * const *) av, (char * const *) ev); /* bogus, huh? */ #endif + #ifdef DEFAULTINTERP if (errno == ENOEXEC) { *av = path; *--av = DEFAULTINTERP; - execve(*av, (const char **) av, (const char **) ev); + execve(*av, (char * const *) av, (char * const *) ev); } #endif uerror(*av); |