blob: b356a694dbd3944a9527069e89dddca2f0802ecb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#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));
}
|