Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / posix / execle.c
blob34f0ea373c6ba486be2bee86d70f132e32b5eed1
1 #ifndef _NO_EXECVE
3 /* execle.c */
5 /* This and the other exec*.c files in this directory require
6 the target to provide the _execve syscall. */
8 #include <_ansi.h>
9 #include <unistd.h>
12 #include <stdarg.h>
14 int
15 execle (const char *path,
16 const char *arg0, ...)
20 int i;
21 va_list args;
22 const char * const *envp;
23 const char *argv[256];
25 va_start (args, arg0);
26 argv[0] = arg0;
27 i = 1;
29 argv[i] = va_arg (args, const char *);
30 while (argv[i++] != NULL);
31 envp = va_arg (args, const char * const *);
32 va_end (args);
34 return _execve (path, (char * const *) argv, (char * const *) envp);
37 #endif /* !_NO_EXECVE */