/********************************************************************************************************* ** Function name: isatty ** Descriptions: 判断文件是不是一个 TTY ** input parameters: fd 文件描述符 ** output parameters: NONE ** Returned value: 1 OR 0 *********************************************************************************************************/ int isatty(int fd) { return _isatty_r(_REENT, fd); }
/* Compatibility define for newlib built without REENTRANT_SYSCALLS_PROVIDED */ int _isatty(int fd) { /* _REENT is an internal newlib macro, this may cause issues in some situations. */ return _isatty_r (_REENT, fd); }