[libc][kconfig] update Kconfig
This commit is contained in:
parent
3a3b7ee632
commit
215d1d4c6e
|
@ -2,7 +2,8 @@ menu "POSIX layer and C standard library"
|
||||||
|
|
||||||
config RT_USING_LIBC
|
config RT_USING_LIBC
|
||||||
bool "Enable libc APIs from toolchain"
|
bool "Enable libc APIs from toolchain"
|
||||||
default y
|
select RT_USING_HEAP
|
||||||
|
default n
|
||||||
|
|
||||||
if RT_USING_LIBC
|
if RT_USING_LIBC
|
||||||
config RT_LIBC_USING_TIME
|
config RT_LIBC_USING_TIME
|
||||||
|
|
|
@ -80,7 +80,7 @@ void _free_r (struct _reent *ptr, void *addr)
|
||||||
void *
|
void *
|
||||||
_sbrk_r(struct _reent *ptr, ptrdiff_t incr)
|
_sbrk_r(struct _reent *ptr, ptrdiff_t incr)
|
||||||
{
|
{
|
||||||
LOG_E("Please enable RT_USING_HEAP or RT_USING_LIBC");
|
LOG_E("Please enable RT_USING_HEAP");
|
||||||
RT_ASSERT(0);
|
RT_ASSERT(0);
|
||||||
return RT_NULL;
|
return RT_NULL;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,12 @@ int _getpid_r(struct _reent *ptr)
|
||||||
|
|
||||||
int _close_r(struct _reent *ptr, int fd)
|
int _close_r(struct _reent *ptr, int fd)
|
||||||
{
|
{
|
||||||
|
#ifdef RT_USING_POSIX
|
||||||
return close(fd);
|
return close(fd);
|
||||||
|
#else
|
||||||
|
ptr->_errno = ENOTSUP;
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int _execve_r(struct _reent *ptr, const char * name, char *const *argv, char *const *env)
|
int _execve_r(struct _reent *ptr, const char * name, char *const *argv, char *const *env)
|
||||||
|
|
Loading…
Reference in New Issue