diff options
author | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-18 01:48:54 +0300 |
---|---|---|
committer | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-18 01:48:54 +0300 |
commit | 03261851a10dd2d6900a0a00a7515a0a46fb5d76 (patch) | |
tree | 7c22ac6cbbc99fd5cd1b5426853be8d4fd7bfcf1 /libgloss/i960/mon960.c | |
parent | fae4c299f14fc23e2829c8656992eba21f79242a (diff) |
20000317 sourceware import
Diffstat (limited to 'libgloss/i960/mon960.c')
-rw-r--r-- | libgloss/i960/mon960.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/libgloss/i960/mon960.c b/libgloss/i960/mon960.c new file mode 100644 index 000000000..f81b6ac29 --- /dev/null +++ b/libgloss/i960/mon960.c @@ -0,0 +1,83 @@ +#include <sys/types.h> +#include <sys/stat.h> + +static char *heap_end = 0; + +int +brk (void *ptr) +{ + heap_end = ptr; + return 0; +} + +caddr_t +sbrk (int amt) +{ + extern char end; + char *prev_heap_end; + + if (heap_end == 0) + heap_end = &end; + prev_heap_end = heap_end; + heap_end += amt; + return ((caddr_t) prev_heap_end); +} + +int +isatty (int file) +{ + return file<3; +} + +int +fstat (int file, struct stat *st) +{ + st->st_mode = S_IFCHR; + return 0; +} + +int +stat (const char *filename, struct stat *st) +{ + st->st_mode = S_IFCHR; + return 0; +} + +int +lseek (int fd, off_t offset, int type) +{ + return _sys_lseek (fd, offset, type); +} + +int +open (char *file, int mode, int perms) +{ + return _sys_open (file, mode, perms); +} + +int +close (int fd) +{ + return _sys_close (fd); +} + +int +getpid () +{ + return -1; +} + +int +kill (int pid, int signal) +{ + exit (signal); +} + +#if 0 +/* This conflicts with the abort defined in newlib. */ +void +abort () +{ + exit (6); +} +#endif |