Skip to content

Commit a01d01b

Browse files
committed
add min/max & stdlib_noniso to Arduino.h
1 parent 886d004 commit a01d01b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cores/esp32/Arduino.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ extern "C" {
3838
#include <stdlib.h>
3939
#include <string.h>
4040
#include <inttypes.h>
41+
#include <math.h>
42+
#include "stdlib_noniso.h"
4143

4244
typedef bool boolean;
4345
typedef uint8_t byte;
@@ -48,6 +50,13 @@ typedef uint8_t byte;
4850
}
4951
#endif
5052

53+
54+
#ifndef _GLIBCXX_VECTOR
55+
// arduino is not compatible with std::vector
56+
#define min(a,b) ((a)<(b)?(a):(b))
57+
#define max(a,b) ((a)>(b)?(a):(b))
58+
#endif
59+
5160
#include "WCharacter.h"
5261
#include "WString.h"
5362
#include "Stream.h"

0 commit comments

Comments
 (0)