summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authortim <tim>1997-07-01 19:57:16 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:00 +0100
commit8a03ed3fc54e728f7ccd2fef40b7215e1d072054 (patch)
tree28f49822188154e7930042b6b7ed7894cda9027e /exec.c
parenta819960f747a251f4b9d88e3e56f9144318efd71 (diff)
autoconf
get consts right in casts
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/exec.c b/exec.c
index 8ed8ead..6a0082e 100644
--- a/exec.c
+++ b/exec.c
@@ -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);