1 #ifndef _RANGE_H 2 #define _RANGE_H 3 4 #ifndef MIN 5 #define MIN(a, b) \ 6 ({ \ 7 typeof(a) _a = a; \ 8 typeof(b) _b = b; \ 9 _a < _b ? _a : _b; \ 10 }) 11 #endif 12 13 #ifndef MAX 14 #define MAX(a, b) \ 15 ({ \ 16 typeof(a) _a = a; \ 17 typeof(b) _b = b; \ 18 _a > _b ? _a : _b; \ 19 }) 20 #endif 21 22 #endif 23