OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [posix/] [execl.c] - Diff between revs 39 and 40

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 39 Rev 40
/* execl.c */
/* execl.c */
 
 
/* This and the other exec*.c files in this directory require
/* This and the other exec*.c files in this directory require
   the target to provide the _execve syscall.  */
   the target to provide the _execve syscall.  */
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <unistd.h>
#include <unistd.h>
 
 
#ifdef _HAVE_STDC
#ifdef _HAVE_STDC
 
 
#include <stdarg.h>
#include <stdarg.h>
 
 
int
int
execl (_CONST char *path, _CONST char *arg0, ...)
execl (_CONST char *path, _CONST char *arg0, ...)
 
 
#else
#else
 
 
#include <varargs.h>
#include <varargs.h>
 
 
int
int
execl (path, arg0, va_alist)
execl (path, arg0, va_alist)
     _CONST char *path;
     _CONST char *path;
     _CONST char *arg0;
     _CONST char *arg0;
     va_dcl
     va_dcl
 
 
#endif
#endif
 
 
{
{
  int i;
  int i;
  va_list args;
  va_list args;
  _CONST char *argv[256];
  _CONST char *argv[256];
 
 
  va_start (args, arg0);
  va_start (args, arg0);
  argv[0] = arg0;
  argv[0] = arg0;
  i = 1;
  i = 1;
  do
  do
      argv[i] = va_arg (args, _CONST char *);
      argv[i] = va_arg (args, _CONST char *);
  while (argv[i++] != NULL);
  while (argv[i++] != NULL);
  va_end (args);
  va_end (args);
 
 
  return _execve (path, (char * _CONST  *) argv, environ);
  return _execve (path, (char * _CONST  *) argv, environ);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.