[iar] 修复编译错误 (#6126)
This commit is contained in:
parent
b19602bcaa
commit
e1e1596cbd
|
@ -10,12 +10,14 @@
|
||||||
|
|
||||||
#include "posix/ctype.h"
|
#include "posix/ctype.h"
|
||||||
|
|
||||||
|
#if !(defined(__ICCARM__) && (__VER__ > 9000000)) /* IAR9.0 has defined */
|
||||||
#ifndef isascii /* some toolchain use macro to define it */
|
#ifndef isascii /* some toolchain use macro to define it */
|
||||||
int isascii(int c)
|
int isascii(int c)
|
||||||
{
|
{
|
||||||
return c >= 0x00 && c <= 0x7f;
|
return c >= 0x00 && c <= 0x7f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* !(defined(__ICCARM__) && (__VER__ > 9000000)) */
|
||||||
|
|
||||||
#ifndef toascii
|
#ifndef toascii
|
||||||
int toascii(int c)
|
int toascii(int c)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
|
||||||
|
#ifdef DFS_USING_POSIX
|
||||||
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream)
|
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream)
|
||||||
{
|
{
|
||||||
char *cur_pos, *new_lineptr;
|
char *cur_pos, *new_lineptr;
|
||||||
|
@ -83,3 +84,4 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream)
|
||||||
{
|
{
|
||||||
return getdelim(lineptr, n, '\n', stream);
|
return getdelim(lineptr, n, '\n', stream);
|
||||||
}
|
}
|
||||||
|
#endif /* DFS_USING_POSIX */
|
||||||
|
|
|
@ -17,9 +17,12 @@ extern "C" {
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if !(defined(__ICCARM__) && (__VER__ > 9000000)) /* IAR9.0 has defined */
|
||||||
#ifndef isascii /* some toolchain use macro to define it */
|
#ifndef isascii /* some toolchain use macro to define it */
|
||||||
int isascii(int c);
|
int isascii(int c);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* !(defined(__ICCARM__) && (__VER__ > 9000000)) */
|
||||||
|
|
||||||
#ifndef toascii
|
#ifndef toascii
|
||||||
int toascii(int c);
|
int toascii(int c);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,8 +18,10 @@ extern "C" {
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef DFS_USING_POSIX
|
||||||
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
|
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
|
||||||
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
|
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
|
||||||
|
#endif /* DFS_USING_POSIX */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue