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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [sparc/] [sysc-701.c] - Diff between revs 158 and 816

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

Rev 158 Rev 816
/* 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.