blob: 7b1f010864f65be94bad1ecb6f9fa07f3c0e1f70 [file] [log] [blame]
#ifndef _RANGE_H
#define _RANGE_H
#ifndef MIN
#define MIN(a, b) \
({ \
typeof(a) _a = a; \
typeof(b) _b = b; \
_a < _b ? _a : _b; \
})
#endif
#ifndef MAX
#define MAX(a, b) \
({ \
typeof(a) _a = a; \
typeof(b) _b = b; \
_a > _b ? _a : _b; \
})
#endif
#endif