#include "un-namespace.h"
#include "libc_private.h"
-extern char **environ;
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+
+int
+_execvpe(const char *name, char * const argv[], char * const envp[]);
int
execl(const char *name, const char *arg, ...)
}
if (eacces)
errno = EACCES;
- else
+ else if (cur)
errno = ENOENT;
+ /* else use existing errno from _execve */
done:
return (-1);
}
return execvPe(name, path, argv, environ);
}
-int
+__private_extern__ int
_execvpe(const char *name, char * const argv[], char * const envp[])
{
const char *path;