blob: 317047ed416607db1ab1a6e7f4b96ef8357b9313 [file] [log] [blame] [raw]
#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);
}