diff --git a/include/cxx/cunistd b/include/cxx/cunistd index 5ea58cf090..86238262ec 100644 --- a/include/cxx/cunistd +++ b/include/cxx/cunistd @@ -71,7 +71,9 @@ namespace std // Terminal I/O +#ifdef CONFIG_SERIAL_TERMIOS using ::isatty; +#endif // Memory management diff --git a/include/stdio.h b/include/stdio.h index 1ee68a7518..39180644b3 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -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, diff --git a/include/termios.h b/include/termios.h index 291b3f3070..218e4afd29 100644 --- a/include/termios.h +++ b/include/termios.h @@ -44,6 +44,8 @@ #include #include +#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 */ diff --git a/include/unistd.h b/include/unistd.h index 4a86e5631c..99dbed4fea 100644 --- a/include/unistd.h +++ b/include/unistd.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 */