minmax.h 418 B

12345678910111213141516171819
  1. #ifndef NULLSOFT_BFC_PLATFORM_MINMAX_H
  2. #define NULLSOFT_BFC_PLATFORM_MINMAX_H
  3. #if defined(_WIN32) && !defined(MIN)
  4. #define MIN( a, b ) ((a>b)?b:a)
  5. #define MAX( a, b ) ((a>b)?a:b)
  6. #endif
  7. #if defined(__APPLE__) && !defined(MIN)
  8. #define MIN( a, b ) ((a>b)?b:a)
  9. #define MAX( a, b ) ((a>b)?a:b)
  10. #endif
  11. #if defined(__linux__) && !defined(MIN)
  12. #define MIN( a, b ) ((a>b)?b:a)
  13. #define MAX( a, b ) ((a>b)?a:b)
  14. #endif
  15. #endif