--- a/src/Arduino.h +++ b/src/Arduino.h @@ -208,8 +208,8 @@ //#endif /* __cplusplus */ -#define min(a,b) ((a)<(b)?(a):(b)) -#define max(a,b) ((a)>(b)?(a):(b)) +#define _min(a,b) ((a)<(b)?(a):(b)) +#define _max(a,b) ((a)>(b)?(a):(b)) #include "pins_arduino.h" --- a/src/rtc/DateTime.cpp +++ b/src/rtc/DateTime.cpp @@ -319,7 +319,7 @@ /**************************************************************************/ DateTime::DateTime(const char *iso8601dateTime) { char ref[] = "2000-01-01T00:00:00"; - memcpy(ref, iso8601dateTime, min(strlen(ref), strlen(iso8601dateTime))); + memcpy(ref, iso8601dateTime, _min(strlen(ref), strlen(iso8601dateTime))); yOff = conv2d(ref + 2); m = conv2d(ref + 5); d = conv2d(ref + 8); --- a/src/tft/TFT_eSPI.h +++ b/src/tft/TFT_eSPI.h @@ -17,7 +17,7 @@ #define _TFT_eSPIH_ #include "Arduino.h" -#undef min +#undef _min #include //#include @@ -316,9 +316,9 @@ b = t; } -#ifndef min -// Return minimum of two numbers, may already be defined -#define min(a, b) (((a) < (b)) ? (a) : (b)) +#ifndef _min +// Return _minimum of two numbers, may already be defined +#define _min(a, b) (((a) < (b)) ? (a) : (b)) #endif // This structure allows sketches to retrieve the user setup parameters at runtime