File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -573,10 +573,10 @@ extern "C" {
573573 ssize_t write (int fildes, const void *buf, size_t nbyte);
574574 ssize_t read (int fildes, void *buf, size_t nbyte);
575575 int fsync (int fildes);
576+ int isatty (int fildes);
576577#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
577578 off_t lseek (int fildes, off_t offset, int whence);
578579 int ftruncate (int fildes, off_t length);
579- int isatty (int fildes);
580580 int fstat (int fildes, struct stat *st);
581581 int fcntl (int fildes, int cmd, ...);
582582 int poll (struct pollfd fds[], nfds_t nfds, int timeout);
Original file line number Diff line number Diff line change @@ -948,17 +948,13 @@ extern "C" int PREFIX(_istty)(FILEHANDLE fh)
948948extern " C" int _isatty (FILEHANDLE fh)
949949#endif
950950{
951- #if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
952951 return isatty (fh);
953- #else
954- // Is attached to an interactive device
955- return 1 ;
956- #endif // !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
957952}
958953
959- # if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
954+
960955extern " C" int isatty (int fildes)
961956{
957+ #if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
962958 FileHandle *fhc = mbed_file_handle (fildes);
963959 if (fhc == NULL ) {
964960 errno = EBADF;
@@ -972,8 +968,11 @@ extern "C" int isatty(int fildes)
972968 } else {
973969 return tty;
974970 }
975- }
971+ #else
972+ // Is attached to an interactive device
973+ return 1 ;
976974#endif // !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
975+ }
977976
978977extern " C"
979978#if defined(__ARMCC_VERSION)
You can’t perform that action at this time.
0 commit comments