source:
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/unistd/ttyname.c
Last change on this file was 352, checked in by , 6 years ago | |
---|---|
|
|
File size: 230 bytes |
Line | |
---|---|
1 | #include <unistd.h> |
2 | #include <errno.h> |
3 | #include <limits.h> |
4 | |
5 | char *ttyname(int fd) |
6 | { |
7 | static char buf[TTY_NAME_MAX]; |
8 | int result; |
9 | if ((result = ttyname_r(fd, buf, sizeof buf))) { |
10 | errno = result; |
11 | return NULL; |
12 | } |
13 | return buf; |
14 | } |
Note:
See TracBrowser
for help on using the repository browser.