fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / libgloss / i960 / mon960.c
blobf81b6ac29f470022d39273167c822a86cd4041a4
1 #include <sys/types.h>
2 #include <sys/stat.h>
4 static char *heap_end = 0;
6 int
7 brk (void *ptr)
9 heap_end = ptr;
10 return 0;
13 caddr_t
14 sbrk (int amt)
16 extern char end;
17 char *prev_heap_end;
19 if (heap_end == 0)
20 heap_end = &end;
21 prev_heap_end = heap_end;
22 heap_end += amt;
23 return ((caddr_t) prev_heap_end);
26 int
27 isatty (int file)
29 return file<3;
32 int
33 fstat (int file, struct stat *st)
35 st->st_mode = S_IFCHR;
36 return 0;
39 int
40 stat (const char *filename, struct stat *st)
42 st->st_mode = S_IFCHR;
43 return 0;
46 int
47 lseek (int fd, off_t offset, int type)
49 return _sys_lseek (fd, offset, type);
52 int
53 open (char *file, int mode, int perms)
55 return _sys_open (file, mode, perms);
58 int
59 close (int fd)
61 return _sys_close (fd);
64 int
65 getpid ()
67 return -1;
70 int
71 kill (int pid, int signal)
73 exit (signal);
76 #if 0
77 /* This conflicts with the abort defined in newlib. */
78 void
79 abort ()
81 exit (6);
83 #endif