blob: 589a8f65c158d1822eba100f5777e324ce4b992b (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <asm-generic/ioctls.h> // for TIOCGWINSZ
#include <syscall.h> // for __syscall_3, syscall
#include <termios.h> // for winsize
#include <unistd.h> // for isatty
int isatty(int fildes)
{
struct winsize winsize;
return (int)(1 + syscall(ioctl, fildes, TIOCGWINSZ, &winsize));
}
|