mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
newlib: add definitions of system, raise
Closes IDF-1220 Closes IDFGH-1811 Closes https://github.com/espressif/esp-idf/pull/4020
This commit is contained in:
parent
3ba9eae86c
commit
6f0f5d79f9
@ -21,12 +21,23 @@
|
||||
#include <sys/reent.h>
|
||||
|
||||
|
||||
int system(const char* str)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _system_r(struct _reent *r, const char *str)
|
||||
{
|
||||
__errno_r(r) = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int raise(int sig)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
int _raise_r(struct _reent *r, int sig)
|
||||
{
|
||||
abort();
|
||||
|
@ -182,3 +182,8 @@ TEST_CASE("fmod and fmodf work as expected", "[newlib]")
|
||||
TEST_ASSERT_EQUAL(0.1, fmod(10.1, 2.0));
|
||||
TEST_ASSERT_EQUAL(0.1f, fmodf(10.1f, 2.0f));
|
||||
}
|
||||
|
||||
TEST_CASE("newlib: can link 'system', 'raise'", "[newlib]")
|
||||
{
|
||||
printf("system: %p, raise: %p\n", &system, &raise);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user