__IAR_SYSTEMS_ICC__ macro had issues when 7.5 and 8.11 both workbench are installed

pull/4938/head
Deepika 2017-08-22 17:17:07 -05:00
parent 5875569070
commit 7d98eebf2a
2 changed files with 6 additions and 6 deletions

View File

@ -843,7 +843,7 @@ std::FILE *mbed_fdopen(FileHandle *fh, const char *mode)
}
int mbed_getc(std::FILE *_file){
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8) )
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ < 8000000)
/*This is only valid for unbuffered streams*/
int res = std::fgetc(_file);
if (res>=0){
@ -858,7 +858,7 @@ int mbed_getc(std::FILE *_file){
}
char* mbed_gets(char*s, int size, std::FILE *_file){
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8))
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ < 8000000)
/*This is only valid for unbuffered streams*/
char *str = fgets(s,size,_file);
if (str!=NULL){
@ -884,8 +884,8 @@ extern "C" WEAK void __iar_file_Mtxinit(__iar_Rmtx *mutex) {}
extern "C" WEAK void __iar_file_Mtxdst(__iar_Rmtx *mutex) {}
extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {}
extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {}
#if (__IAR_SYSTEMS_ICC__ >= 8)
extern "C" WEAK void *__aeabi_read_tp (void) {}
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
extern "C" WEAK void *__aeabi_read_tp (void) { return NULL ;}
#endif
#elif defined(__CC_ARM)
// Do nothing

View File

@ -168,7 +168,7 @@
#include "cmsis_os2.h"
#include "mbed_toolchain.h"
#include "mbed_error.h"
#if (defined(__ICCARM__) && (__IAR_SYSTEMS_ICC__ >= 8) )
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
#include <DLib_Threads.h>
#endif
/* Heap limits - only used if set */
@ -576,7 +576,7 @@ void pre_main(void)
singleton_mutex_attr.cb_mem = &singleton_mutex_obj;
singleton_mutex_id = osMutexNew(&singleton_mutex_attr);
#if (__IAR_SYSTEMS_ICC__ >= 8)
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
__iar_Initlocks();
#endif