mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 03:47:11 +08:00
[libc]fix bug of _isatty_r()
This commit is contained in:
parent
bc28df8b35
commit
20b95b8af5
@ -8,6 +8,7 @@
|
|||||||
* 2021-02-11 Meco Man remove _gettimeofday_r() and _times_r()
|
* 2021-02-11 Meco Man remove _gettimeofday_r() and _times_r()
|
||||||
* 2020-02-13 Meco Man re-implement exit() and abort()
|
* 2020-02-13 Meco Man re-implement exit() and abort()
|
||||||
* 2020-02-21 Meco Man improve and beautify syscalls
|
* 2020-02-21 Meco Man improve and beautify syscalls
|
||||||
|
* 2020-02-24 Meco Man fix bug of _isatty_r()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
@ -89,12 +90,14 @@ int
|
|||||||
_isatty_r(struct _reent *ptr, int fd)
|
_isatty_r(struct _reent *ptr, int fd)
|
||||||
{
|
{
|
||||||
if (fd >=0 && fd < 3)
|
if (fd >=0 && fd < 3)
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
ptr->_errno = ENOTTY ;
|
else
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_kill_r(struct _reent *ptr, int pid, int sig)
|
_kill_r(struct _reent *ptr, int pid, int sig)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user