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" {
573
573
ssize_t write (int fildes, const void *buf, size_t nbyte);
574
574
ssize_t read (int fildes, void *buf, size_t nbyte);
575
575
int fsync (int fildes);
576
+ int isatty (int fildes);
576
577
#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
577
578
off_t lseek (int fildes, off_t offset, int whence);
578
579
int ftruncate (int fildes, off_t length);
579
- int isatty (int fildes);
580
580
int fstat (int fildes, struct stat *st);
581
581
int fcntl (int fildes, int cmd, ...);
582
582
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)
948
948
extern " C" int _isatty (FILEHANDLE fh)
949
949
#endif
950
950
{
951
- #if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
952
951
return isatty (fh);
953
- #else
954
- // Is attached to an interactive device
955
- return 1 ;
956
- #endif // !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
957
952
}
958
953
959
- # if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
954
+
960
955
extern " C" int isatty (int fildes)
961
956
{
957
+ #if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
962
958
FileHandle *fhc = mbed_file_handle (fildes);
963
959
if (fhc == NULL ) {
964
960
errno = EBADF;
@@ -972,8 +968,11 @@ extern "C" int isatty(int fildes)
972
968
} else {
973
969
return tty;
974
970
}
975
- }
971
+ #else
972
+ // Is attached to an interactive device
973
+ return 1 ;
976
974
#endif // !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
975
+ }
977
976
978
977
extern " C"
979
978
#if defined(__ARMCC_VERSION)
You can’t perform that action at this time.
0 commit comments