* src/vm/global.h: Added definition of MIN macro with guard.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Wed, 15 Jul 2009 11:03:54 +0000 (13:03 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Wed, 15 Jul 2009 11:03:54 +0000 (13:03 +0200)
* src/vm/jit/sparc64/md-abi.c (MIN): Removed macro.
* src/vm/jit/stack.c (MIN): Likewise.

src/vm/global.h
src/vm/jit/sparc64/md-abi.c
src/vm/jit/stack.c

index 33b7fb1e7ecd32cae73c00b1d1155bc902e12e16..420352c6a1c0636e16b8771cad188b4c634a38d4 100644 (file)
@@ -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 ***********************************************************/
 
index 3218d422894bf39f9fb9d195a57845d2a48255e7..e41cfb5505a7498eb571cbe974e8ad80ded55328 100644 (file)
@@ -39,9 +39,6 @@
 #include <assert.h>
 
 
-/* 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. */
index 06ff37115626da6f2912bdc61d1b873756025f46..592ce154418c99a0939ffeac01444d4b21555090 100644 (file)
@@ -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 */