1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Mock - update func signatures for latest glibc (#9117)

glibc 2.38 includes strlcpy and strlcat, attempt to detect them before use
This commit is contained in:
Max Prokhorov
2024-07-31 02:24:41 +03:00
committed by GitHub
parent 05f05d0dab
commit 3a5157e3ba
8 changed files with 139 additions and 129 deletions

View File

@ -56,18 +56,23 @@
#define D8 8
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib_noniso.h>
#ifdef __cplusplus
extern "C"
{
#endif
// TODO: #include <stdlib_noniso.h> ?
char* itoa(int val, char* s, int radix);
char* ltoa(long val, char* s, int radix);
char* utoa(unsigned value, char* result, int base);
char* itoa(int value, char* result, int base);
#ifdef STRLCAT_MISSING
size_t strlcat(char* dst, const char* src, size_t size);
#endif
#ifdef STRLCPY_MISSING
size_t strlcpy(char* dst, const char* src, size_t size);
#endif
#ifdef __cplusplus
}
#endif