Skip to content

Commit b6ea1e4

Browse files
committed
add includes for <stddef.h> <stdarg.h> <stdio.h> to Arduino.h
add strtok
1 parent 6cf8770 commit b6ea1e4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

cores/esp8266/Arduino.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,23 @@
2020
#ifndef Arduino_h
2121
#define Arduino_h
2222

23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
2327
#include <stdlib.h>
2428
#include <stdint.h>
2529
#include <stdbool.h>
30+
#include <stddef.h>
31+
#include <stdarg.h>
32+
#include <stdio.h>
2633
#include <string.h>
2734
#include <math.h>
2835

2936
#include "binary.h"
3037
#include "pgmspace.h"
3138

32-
#ifdef __cplusplus
33-
extern "C" {
34-
#endif
39+
3540

3641
void yield(void);
3742

cores/esp8266/libc_replacements.c

+4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ char* ICACHE_FLASH_ATTR strncat(char * dest, const char * src, size_t n) {
159159
return dest;
160160
}
161161

162+
char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) {
163+
return strtok_r(str, delimiters, NULL);
164+
}
165+
162166
char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** temp) {
163167
static char * ret = NULL;
164168
char * start = NULL;

0 commit comments

Comments
 (0)