From 8e5e5939a03ed41876cac78982d01e88ebdd2cc1 Mon Sep 17 00:00:00 2001 From: Michael Starzinger Date: Wed, 15 Jul 2009 13:03:54 +0200 Subject: [PATCH] * src/vm/global.h: Added definition of MIN macro with guard. * src/vm/jit/sparc64/md-abi.c (MIN): Removed macro. * src/vm/jit/stack.c (MIN): Likewise. --- src/vm/global.h | 6 ++++++ src/vm/jit/sparc64/md-abi.c | 3 --- src/vm/jit/stack.c | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vm/global.h b/src/vm/global.h index 33b7fb1e7..420352c6a 100644 --- a/src/vm/global.h +++ b/src/vm/global.h @@ -89,6 +89,12 @@ typedef union { #define STR(a) #a +/* There are multiple definitions of MIN out there, but we cannot be sure. */ + +#ifndef MIN +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + /* forward typedefs ***********************************************************/ diff --git a/src/vm/jit/sparc64/md-abi.c b/src/vm/jit/sparc64/md-abi.c index 3218d4228..e41cfb550 100644 --- a/src/vm/jit/sparc64/md-abi.c +++ b/src/vm/jit/sparc64/md-abi.c @@ -39,9 +39,6 @@ #include -/* helper macros for allocation methods ***************************************/ -#define MIN(a,b) (((a) <= (b)) ? (a) : (b)) - /* register descripton array **************************************************/ /* callee point-of-view, after SAVE has been called. */ diff --git a/src/vm/jit/stack.c b/src/vm/jit/stack.c index 06ff37115..592ce1544 100644 --- a/src/vm/jit/stack.c +++ b/src/vm/jit/stack.c @@ -93,9 +93,6 @@ #endif -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) - - /* For returnAddresses we use a field of the typeinfo to store from which */ /* subroutine the returnAddress will return, if used. */ /* XXX It would be nicer to use typeinfo.typeclass, but the verifier seems */ -- 2.25.1