OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [libgloss/] [sparc/] [sysc-701.c] - Diff between revs 207 and 345

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
/* more sparclet syscall support (the rest is in crt0-701.S).  */
/* more sparclet syscall support (the rest is in crt0-701.S).  */
 
 
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <errno.h>
#include <errno.h>
 
 
int
int
fstat(int _fd, struct stat* _sbuf)
fstat(int _fd, struct stat* _sbuf)
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return -1;
  return -1;
}
}
 
 
int
int
isatty(int fd)
isatty(int fd)
{
{
  if (fd < 0)
  if (fd < 0)
    {
    {
      errno = EBADF;
      errno = EBADF;
      return -1;
      return -1;
    }
    }
  return fd <= 2;
  return fd <= 2;
}
}
 
 
int
int
getpid()
getpid()
{
{
  return 1;
  return 1;
}
}
 
 
int
int
kill(int pid)
kill(int pid)
{
{
  /* if we knew how to nuke the board, we would... */
  /* if we knew how to nuke the board, we would... */
  return 0;
  return 0;
}
}
 
 
int
int
lseek(int _fd, off_t offset, int whence)
lseek(int _fd, off_t offset, int whence)
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return -1;
  return -1;
}
}
 
 
extern char end;
extern char end;
char*
char*
sbrk (int incr)
sbrk (int incr)
{
{
  static char* base;
  static char* base;
  char *b;
  char *b;
  if(!base) base = &end;
  if(!base) base = &end;
  b = base;
  b = base;
  base += incr;
  base += incr;
  return b;
  return b;
}
}
 
 

powered by: WebSVN 2.1.0

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