#include <windows.h> | |
#include <shared.h> | |
#include <errno.h> | |
int isatty(int fd) { | |
BY_HANDLE_FILE_INFORMATION_NEW information; | |
if(fd == -1) { | |
errno = EBADF; | |
return 0; | |
} | |
return !GetFileInformationByHandle((void *)fd, (BY_HANDLE_FILE_INFORMATION *)&information); | |
} |