include: add dependence to setvbuf & isatty, undefine symbols when !CONFIG_SERIAL_TERMIOS
Change-Id: I053504fcfc90d926e6f529bfd7badedc71596313 Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
4d787db5bb
commit
57dfb98713
4 changed files with 11 additions and 0 deletions
|
|
@ -71,7 +71,9 @@ namespace std
|
|||
|
||||
// Terminal I/O
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
using ::isatty;
|
||||
#endif
|
||||
|
||||
// Memory management
|
||||
|
||||
|
|
|
|||
|
|
@ -163,8 +163,12 @@ ssize_t getline(FAR char **lineptr, size_t *n, FAR FILE *stream);
|
|||
FAR char *gets(FAR char *s);
|
||||
FAR char *gets_s(FAR char *s, rsize_t n);
|
||||
void rewind(FAR FILE *stream);
|
||||
|
||||
#ifndef CONFIG_STDIO_DISABLE_BUFFERING
|
||||
void setbuf(FAR FILE *stream, FAR char *buf);
|
||||
int setvbuf(FAR FILE *stream, FAR char *buffer, int mode, size_t size);
|
||||
#endif
|
||||
|
||||
int ungetc(int c, FAR FILE *stream);
|
||||
|
||||
/* Operations on the stdout stream, buffers, paths,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
|
@ -325,4 +327,5 @@ int tcsetattr(int fd, int options, FAR const struct termios *termiosp);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_SERIAL_TERMIOS */
|
||||
#endif /* __INCLUDE_TERMIOS_H */
|
||||
|
|
|
|||
|
|
@ -327,9 +327,11 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset);
|
|||
ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset);
|
||||
int ftruncate(int fd, off_t length);
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
/* Check if a file descriptor corresponds to a terminal I/O file */
|
||||
|
||||
int isatty(int fd);
|
||||
#endif
|
||||
|
||||
/* Memory management */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue