repo.or.cz
/
zpugcc
/
jano.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git]
/
toolchain
/
gcc
/
newlib
/
libc
/
sys
/
sparc64
/
isatty.c
blob
3c64647a944456101b3f359b25b12845bc408a4c
1
/* isatty.c */
2
3
/* Dumb implementation so programs will at least run. */
4
5
#include <sys/stat.h>
6
7
int
8
isatty
(
int
fd
)
9
{
10
struct
stat buf
;
11
12
if
(
fstat
(
fd
, &
buf
) <
0
)
13
return
0
;
14
if
(
S_ISCHR
(
buf
.
st_mode
))
15
return
1
;
16
return
0
;
17
}