From 03261851a10dd2d6900a0a00a7515a0a46fb5d76 Mon Sep 17 00:00:00 2001 From: Ranjith Kumaran Date: Fri, 17 Mar 2000 22:48:54 +0000 Subject: 20000317 sourceware import --- libgloss/sparc/sysc-701.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 libgloss/sparc/sysc-701.c (limited to 'libgloss/sparc/sysc-701.c') diff --git a/libgloss/sparc/sysc-701.c b/libgloss/sparc/sysc-701.c new file mode 100644 index 000000000..191a08a09 --- /dev/null +++ b/libgloss/sparc/sysc-701.c @@ -0,0 +1,55 @@ +/* more sparclet syscall support (the rest is in crt0-701.S). */ + +#include +#include +#include + +int +fstat(int _fd, struct stat* _sbuf) +{ + errno = ENOSYS; + return -1; +} + +int +isatty(int fd) +{ + if (fd < 0) + { + errno = EBADF; + return -1; + } + return fd <= 2; +} + +int +getpid() +{ + return 1; +} + +int +kill(int pid) +{ + /* if we knew how to nuke the board, we would... */ + return 0; +} + +int +lseek(int _fd, off_t offset, int whence) +{ + errno = ENOSYS; + return -1; +} + +extern char end; +char* +sbrk (int incr) +{ + static char* base; + char *b; + if(!base) base = &end; + b = base; + base += incr; + return b; +} -- cgit v1.2.3