diff options
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h index b91ff8a9e5b..306aabd15fe 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -454,7 +454,10 @@ int __void__; #endif /* Define some useful general macros */ -#if !defined(max) +#if defined(__cplusplus) && defined(__GNUC__) +#define max(a, b) ((a) >? (b)) +#define min(a, b) ((a) <? (b)) +#elif !defined(max) #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) #endif |