Skip to content

Commit

Permalink
解决IAR编译器报错的问题
Browse files Browse the repository at this point in the history
Signed-off-by: Meco Man <920369182@qq.com>
  • Loading branch information
mysterywolf committed Apr 17, 2021
1 parent 19751a7 commit faf3bee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion vi_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ char* last_char_is(const char *s, int c)
}
#endif

#if defined(_MSC_VER) || defined(__CC_ARM)
#if defined(_MSC_VER) || defined(__CC_ARM) || defined(__ICCARM__)
void *memrchr(const void* ptr, int ch, size_t pos)
{
char *end = (char *)ptr+pos-1;
Expand All @@ -60,13 +60,15 @@ void *memrchr(const void* ptr, int ch, size_t pos)
return (*end == ch)?(end):(NULL);
}

#ifndef __ICCARM__
int isblank(int ch)
{
if (ch == ' ' || ch == '\t')
return 1;
return 0;
}
#endif
#endif

#ifdef VI_ENABLE_SETOPTS
char* skip_whitespace(const char *s)
Expand Down
2 changes: 1 addition & 1 deletion vi_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ typedef enum {FALSE = 0, TRUE = !FALSE} bool;
typedef int smallint;
typedef unsigned smalluint;

#if defined(_MSC_VER) || defined(__CC_ARM)
#if defined(_MSC_VER) || defined(__CC_ARM) || defined(__ICCARM__)
#define ALIGN1
#define barrier()
#define F_OK 0
Expand Down

0 comments on commit faf3bee

Please sign in to comment.