未验证 提交 18bf0980 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1630 from RT-Thread/feature_strdup

[Kernel] Add strdup for armcc
......@@ -549,6 +549,10 @@ rt_int32_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count);
rt_int32_t rt_strcmp(const char *cs, const char *ct);
rt_size_t rt_strlen(const char *src);
char *rt_strdup(const char *s);
#ifdef __CC_ARM
/* leak strdup interface */
char* strdup(const char* str);
#endif
char *rt_strstr(const char *str1, const char *str2);
rt_int32_t rt_sscanf(const char *buf, const char *fmt, ...);
......
......@@ -531,6 +531,9 @@ char *rt_strdup(const char *s)
return tmp;
}
RTM_EXPORT(rt_strdup);
#ifdef __CC_ARM
char *strdup(const char *s) __attribute__((alias("rt_strdup")));
#endif
#endif
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册