blob: f81b6ac29f470022d39273167c822a86cd4041a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
|