diff options
Diffstat (limited to 'utils/utils.h')
-rw-r--r-- | utils/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h index f1c193bac..84322156e 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -35,6 +35,10 @@ #ifndef ABS #define ABS(x) (((x)>0)?(x):(-(x))) #endif +#ifdef __MINT__ /* avoid using GCCs builtin min/max functions */ +#undef min +#undef max +#endif #ifndef min #define min(x,y) (((x)<(y))?(x):(y)) #endif @@ -52,6 +56,10 @@ #define strtof(s,p) ((float)(strtod((s),(p)))) #endif +#if !defined(ceilf) && defined(__MINT__) +#define ceilf(x) (float)ceil((double)x) +#endif + /** * Calculate length of constant C string. * |