summaryrefslogtreecommitdiffstats
path: root/libgloss/sparc/sysc-701.c
diff options
context:
space:
mode:
authorRanjith Kumaran <ranjith@cygnus.com>2000-03-17 22:48:54 +0000
committerRanjith Kumaran <ranjith@cygnus.com>2000-03-17 22:48:54 +0000
commit03261851a10dd2d6900a0a00a7515a0a46fb5d76 (patch)
tree7c22ac6cbbc99fd5cd1b5426853be8d4fd7bfcf1 /libgloss/sparc/sysc-701.c
parentfae4c299f14fc23e2829c8656992eba21f79242a (diff)
downloadcygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.gz
cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.bz2
cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.zip
20000317 sourceware import
Diffstat (limited to 'libgloss/sparc/sysc-701.c')
-rw-r--r--libgloss/sparc/sysc-701.c55
1 files changed, 55 insertions, 0 deletions
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 <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+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;
+}