only define MIN/MAX if they are not defined yet

This closes #72
This commit is contained in:
Steffen Jaeckel 2017-04-01 00:35:03 +02:00
parent a7d5af27a3
commit 2dad1298ad
1 changed files with 6 additions and 2 deletions

View File

@ -18,9 +18,13 @@
#include <tommath.h>
#include <ctype.h>
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#endif
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
#ifndef MAX
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
#endif
#ifdef __cplusplus
extern "C" {