mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
Picolib (#24558)
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
|
||||
|
||||
#if !defined(__time_t_defined) // avoid conflict with newlib or other posix libc
|
||||
#if !defined(__PICOLIBC__)
|
||||
typedef unsigned long time_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// This ugly hack allows us to define C++ overloaded functions, when included
|
||||
|
||||
@@ -148,13 +148,20 @@ double TaylorLog(double x)
|
||||
// This is demo code to guide developers in implementing their own approximation
|
||||
// software. This code is merely meant to illustrate algorithms.
|
||||
|
||||
inline float sinf(float x) { return sin_52(x); }
|
||||
inline float cosf(float x) { return cos_52(x); }
|
||||
inline float tanf(float x) { return tan_56(x); }
|
||||
inline float atanf(float x) { return atan_66(x); }
|
||||
inline float asinf(float x) { return asinf1(x); }
|
||||
inline float acosf(float x) { return acosf1(x); }
|
||||
inline float sqrtf(float x) { return sqrt1(x); }
|
||||
float sinf(float x) __attribute__((weak));
|
||||
float sinf(float x) { return sin_52(x); }
|
||||
float cosf(float x) __attribute__((weak));
|
||||
float cosf(float x) { return cos_52(x); }
|
||||
float tanf(float x) __attribute__((weak));
|
||||
float tanf(float x) { return tan_56(x); }
|
||||
float atanf(float x) __attribute__((weak));
|
||||
float atanf(float x) { return atan_66(x); }
|
||||
float asinf(float x) __attribute__((weak));
|
||||
float asinf(float x) { return asinf1(x); }
|
||||
float acosf(float x) __attribute__((weak));
|
||||
float acosf(float x) { return acosf1(x); }
|
||||
float sqrtf(float x) __attribute__((weak));
|
||||
float sqrtf(float x) { return sqrt1(x); }
|
||||
|
||||
// Math constants we'll use
|
||||
double const f_pi = 3.1415926535897932384626433; // f_pi
|
||||
|
||||
@@ -26,10 +26,17 @@
|
||||
#include <lwip/sockets.h>
|
||||
#include <lwip/netdb.h>
|
||||
|
||||
#ifdef CONFIG_LIBC_PICOLIBC
|
||||
#define T_IN6_IS_ADDR_V4MAPPED(a) \
|
||||
((((const uint32_t *) (a))[0] == 0) \
|
||||
&& (((const uint32_t *) (a))[1] == 0) \
|
||||
&& (((const uint32_t *) (a))[2] == htonl (0xffff)))
|
||||
#else
|
||||
#define T_IN6_IS_ADDR_V4MAPPED(a) \
|
||||
((((__const uint32_t *) (a))[0] == 0) \
|
||||
&& (((__const uint32_t *) (a))[1] == 0) \
|
||||
&& (((__const uint32_t *) (a))[2] == htonl (0xffff)))
|
||||
#endif
|
||||
|
||||
enum class AsyncTCPState {
|
||||
INPROGRESS,
|
||||
|
||||
Reference in New Issue
Block a user