Skip to content

Commit bcb8779

Browse files
author
Deepika
committed
Internal members of std::FILE are not available from IAR8.x
1 parent 38e96ac commit bcb8779

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/mbed_retarget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ std::FILE *mbed_fdopen(FileHandle *fh, const char *mode)
843843
}
844844

845845
int mbed_getc(std::FILE *_file){
846-
#if defined (__ICCARM__)
846+
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8) )
847847
/*This is only valid for unbuffered streams*/
848848
int res = std::fgetc(_file);
849849
if (res>=0){
@@ -858,7 +858,7 @@ int mbed_getc(std::FILE *_file){
858858
}
859859

860860
char* mbed_gets(char*s, int size, std::FILE *_file){
861-
#if defined (__ICCARM__)
861+
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8))
862862
/*This is only valid for unbuffered streams*/
863863
char *str = fgets(s,size,_file);
864864
if (str!=NULL){

0 commit comments

Comments
 (0)