blob: 191a08a09ad422c292099ec8255c3b31a2b9189d (
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
|
/* 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;
}
|