source: trunk/libs/newlib/src/libgloss/sparc/sysc-701.c @ 480

Last change on this file since 480 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 655 bytes
RevLine 
[444]1/* more sparclet syscall support (the rest is in crt0-701.S).  */
2
3#include <sys/types.h>
4#include <sys/stat.h>
5#include <errno.h>
6
7int
8fstat(int _fd, struct stat* _sbuf)
9{
10  errno = ENOSYS;
11  return -1;
12}
13
14int
15isatty(int fd)
16{
17  if (fd < 0)
18    {
19      errno = EBADF;
20      return -1;
21    }
22  return fd <= 2;
23}
24
25int 
26getpid()
27{
28  return 1;
29}
30
31int 
32kill(int pid)
33{
34  /* if we knew how to nuke the board, we would... */
35  return 0;
36}
37
38int
39lseek(int _fd, off_t offset, int whence)
40{
41  errno = ENOSYS;
42  return -1;
43}
44
45extern char end;
46char*
47sbrk (int incr)
48{
49  static char* base;
50  char *b;
51  if(!base) base = &end;
52  b = base;
53  base += incr;
54  return b;
55}
Note: See TracBrowser for help on using the repository browser.