Merge pull request #3869 from mysterywolf/master
[fix/add/bug] 修改armlibc多处,重新提交了[请求优先通过!!]
This commit is contained in:
commit
86e4216275
|
@ -9,6 +9,8 @@
|
|||
#ifndef FCNTL_H__
|
||||
#define FCNTL_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
#include <dfs_posix.h>
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-09-01 Meco Man First Version
|
||||
*/
|
||||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -46,4 +46,8 @@
|
|||
#define O_SYNC _FSYNC
|
||||
#endif
|
||||
|
||||
|
||||
int isatty (int fd);
|
||||
char * ttyname (int desc);
|
||||
|
||||
#endif /* _SYS_UNISTD_H */
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
* Date Author Notes
|
||||
*/
|
||||
#include "sys/unistd.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-09-01 Meco Man First Version
|
||||
*/
|
||||
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef RT_USING_POSIX_TERMIOS
|
||||
int isatty(int fd)
|
||||
{
|
||||
struct termios ts;
|
||||
return(tcgetattr(fd,&ts) != -1);/*true if no error (is a tty)*/
|
||||
}
|
||||
#endif
|
||||
|
||||
char *ttyname(int fd)
|
||||
{
|
||||
return "/dev/tty0"; /*TODO: need to add more specific*/
|
||||
}
|
|
@ -36,4 +36,8 @@
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
int isatty (int fd);
|
||||
char * ttyname (int desc);
|
||||
|
||||
#endif /* _SYS_UNISTD_H */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2017/08/30 Bernard The first version
|
||||
* 2017/08/30 Bernard The first version
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -111,13 +111,6 @@ int tcdrain(int fd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int isatty (int fd)
|
||||
{
|
||||
struct termios term;
|
||||
|
||||
return tcgetattr (fd, &term) == 0;
|
||||
}
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
void cfmakeraw(struct termios *t)
|
||||
{
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2017/08/30 Bernard The first version
|
||||
* 2017/08/30 Bernard The first version
|
||||
*/
|
||||
#ifndef TERMIOS_H__
|
||||
#define TERMIOS_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue