Avoid redefining min and max on Haiku

This commit is contained in:
Scott McCreary 2013-11-04 19:17:33 +00:00
parent fa665e06f0
commit 17dfb423b8
2 changed files with 4 additions and 2 deletions

View file

@ -58,7 +58,7 @@
#ifndef __HAIKU__
#ifdef __GNUC__
// This version has strict type checking for safety.
// See the "unnecessary" pointer comparison. (from Linux)
@ -76,6 +76,7 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif /* Not Haiku */
#define clamp(lo,value,hi) (min(max(value,lo),hi))

View file

@ -10,6 +10,7 @@
/* min() and max() variable comparisons: */
#ifndef __HAIKU__
#ifdef __GNUC__
// This version has strict type checking for safety.
// See the "unnecessary" pointer comparison. (from Linux)
@ -27,7 +28,7 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif /* Not Haiku */
/* clamp() returns 'value', unless it's less than 'lo' or greater than 'hi',
in which cases it returns 'lo' or 'hi', respectively: */