From 17dfb423b893685ea1a0681039d49298e785d0d8 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Mon, 4 Nov 2013 19:17:33 +0000 Subject: [PATCH] Avoid redefining min and max on Haiku --- src/compiler.h | 3 ++- src/tp_magic_api.h.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler.h b/src/compiler.h index 8b3c40216..3e82ad34b 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -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)) diff --git a/src/tp_magic_api.h.in b/src/tp_magic_api.h.in index 4957f05d1..442f13a6b 100644 --- a/src/tp_magic_api.h.in +++ b/src/tp_magic_api.h.in @@ -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: */