Skip to content

Commit 64a2f1e

Browse files
committed
missing strn program space wrappers
1 parent ad74bee commit 64a2f1e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

hardware/arduino/sam/cores/arduino/avr/pgmspace.h

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ typedef uint32_t prog_uint32_t;
2626
#define strstr_P(a, b) strstr((a), (b))
2727
#define strlen_P(a) strlen((a))
2828
#define sprintf_P(s, f, ...) sprintf((s), (f), __VA_ARGS__)
29+
#define strcasecmp_P(a, b) strcasecmp((a), (b))
30+
#define strncpy_P(dest, src, size) strncpy((dest), (src), (size))
31+
#define strncat_P(dest, src, size) strncat((dest), (src), (size))
32+
#define strncmp_P(a, b, size) strncmp((a), (b), (size))
33+
#define strnlen_P(s, size) strnlen((const char *)(s), (size))
34+
#define strncasecmp_P(a, b, size) strncasecmp((a), (b), (size))
2935

3036
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
3137
#define pgm_read_word(addr) (*(const unsigned short *)(addr))

hardware/esp8266com/esp8266/cores/esp8266/pgmspace.h

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ typedef uint32_t prog_uint32_t;
3838
#define strcmp_P(a, b) strcmp((a), (b))
3939
#define strstr_P(a, b) strstr((a), (b))
4040
#define strlen_P(s) strlen((const char *)(s))
41+
#define strcasecmp_P(a, b) strcasecmp((a), (b))
42+
#define strncpy_P(dest, src, size) strncpy((dest), (src), (size))
43+
#define strncat_P(dest, src, size) strncat((dest), (src), (size))
44+
#define strncmp_P(a, b, size) strncmp((a), (b), (size))
45+
#define strnlen_P(s, size) strnlen((const char *)(s), (size))
46+
#define strncasecmp_P(a, b, size) strncasecmp((a), (b), (size))
4147

4248
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
4349
#define pgm_read_word(addr) (*(const unsigned short *)(addr))

0 commit comments

Comments
 (0)