4.104.114.84.95
Last change
on this file since 0836603 was
0836603,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/18/96 at 21:13:10
|
new files submitted by Craig Lebakken (lebakken@…) and Derrick Ostertag
(ostertag@…)
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * glue.c -- all the code to make GCC and the libraries run on |
---|
3 | * a target board running RTEMS. These should work with |
---|
4 | * any target which conforms to the RTEMS BSP. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef lint |
---|
10 | static char _sccsid[] = "@(#)iface.c 04/12/96 1.1\n"; |
---|
11 | #endif |
---|
12 | |
---|
13 | #include <sys/types.h> |
---|
14 | #include <sys/stat.h> |
---|
15 | #include <errno.h> |
---|
16 | |
---|
17 | int |
---|
18 | read(int fd, |
---|
19 | char *buf, |
---|
20 | int nbytes) |
---|
21 | { |
---|
22 | return __read(fd, buf, nbytes); |
---|
23 | } |
---|
24 | |
---|
25 | int |
---|
26 | write(int fd, |
---|
27 | char *buf, |
---|
28 | int nbytes) |
---|
29 | { |
---|
30 | return __write(fd, buf, nbytes); |
---|
31 | } |
---|
32 | |
---|
33 | int |
---|
34 | open(char *buf, |
---|
35 | int flags, |
---|
36 | int mode) |
---|
37 | { |
---|
38 | return __open(buf, flags, mode); |
---|
39 | } |
---|
40 | |
---|
41 | int |
---|
42 | close(int fd) |
---|
43 | { |
---|
44 | return __close(fd); |
---|
45 | } |
---|
46 | |
---|
47 | /* |
---|
48 | * isatty -- returns 1 if connected to a terminal device, |
---|
49 | * returns 0 if not. |
---|
50 | */ |
---|
51 | int |
---|
52 | isatty(int fd) |
---|
53 | { |
---|
54 | return __isatty(fd); |
---|
55 | } |
---|
56 | |
---|
57 | /* |
---|
58 | * lseek -- move read/write pointer. Since a serial port |
---|
59 | * is non-seekable, we return an error. |
---|
60 | */ |
---|
61 | off_t |
---|
62 | lseek(int fd, |
---|
63 | off_t offset, |
---|
64 | int whence) |
---|
65 | { |
---|
66 | return __lseek(fd, offset, whence); |
---|
67 | } |
---|
68 | |
---|
69 | /* |
---|
70 | * fstat -- get status of a file. Since we have no file |
---|
71 | * system, we just return an error. |
---|
72 | */ |
---|
73 | int |
---|
74 | fstat(int fd, |
---|
75 | struct stat *buf) |
---|
76 | { |
---|
77 | return __fstat(fd, buf); |
---|
78 | } |
---|
79 | |
---|
80 | int |
---|
81 | getpid() |
---|
82 | { |
---|
83 | return __getpid(); |
---|
84 | } |
---|
85 | |
---|
86 | /* |
---|
87 | * kill -- go out via exit... |
---|
88 | */ |
---|
89 | int |
---|
90 | kill(int pid, |
---|
91 | int sig) |
---|
92 | { |
---|
93 | return __kill(pid, sig); |
---|
94 | } |
---|
95 | |
---|
96 | |
---|
Note: See
TracBrowser
for help on using the repository browser.