2022-06-17 16:59:56 +02:00
|
|
|
/*
|
2024-04-11 15:31:06 +03:00
|
|
|
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
|
2022-06-17 16:59:56 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
2020-11-06 15:00:07 +11:00
|
|
|
|
|
|
|
|
#pragma once
|
2024-09-26 13:13:20 +07:00
|
|
|
#include "sdkconfig.h"
|
2020-11-06 15:00:07 +11:00
|
|
|
|
2024-09-26 13:13:20 +07:00
|
|
|
#if CONFIG_LIBC_NEWLIB
|
2023-08-09 12:11:54 +04:00
|
|
|
#define _REENT_BACKWARD_BINARY_COMPAT
|
|
|
|
|
#define _REENT_SDIDINIT(_ptr) ((_ptr)->_reserved_0)
|
|
|
|
|
#define _REENT_SGLUE(_ptr) (__sglue)
|
|
|
|
|
|
2020-11-06 15:00:07 +11:00
|
|
|
#include_next<sys/reent.h>
|
2024-09-26 13:13:20 +07:00
|
|
|
#endif // CONFIG_LIBC_NEWLIB
|
2020-11-06 15:00:07 +11:00
|
|
|
|
2022-07-04 11:53:42 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-09-26 13:13:20 +07:00
|
|
|
#if CONFIG_LIBC_NEWLIB
|
|
|
|
|
|
2024-02-27 10:00:06 +08:00
|
|
|
extern void __sinit(struct _reent *);
|
2023-08-09 12:11:54 +04:00
|
|
|
|
|
|
|
|
extern struct _glue __sglue;
|
|
|
|
|
extern struct _reent * _global_impure_ptr;
|
|
|
|
|
|
2024-09-26 13:13:20 +07:00
|
|
|
#else // CONFIG_LIBC_NEWLIB
|
|
|
|
|
|
|
|
|
|
struct _reent {};
|
|
|
|
|
#define __getreent() NULL
|
|
|
|
|
|
|
|
|
|
int _system_r(struct _reent *r, const char *str);
|
|
|
|
|
int _raise_r(struct _reent *r, int sig);
|
|
|
|
|
|
|
|
|
|
#endif // CONFIG_LIBC_NEWLIB
|
|
|
|
|
|
2022-07-04 11:53:42 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|