Bug#361404: Fix build with GCC 4.2

Mark Brown broonie at sirena.org.uk
Sun Jul 1 13:37:43 UTC 2007


tag 361404 + patch
thanks

Please find enclosed a patch fixing compilation of moagg with GCC 4.2.
It fixes the problem mentioned in the original report and removes the
use of the GCC-specific minimum and maximum operators which have since
been removed from GCC.

If desired I can prepare an upload including this patch.

-- 
"You grabbed my hand and we fell into it, like a daydream - or a fever."
-------------- next part --------------
Fix compilation with G++ 4.2.

Index: moagg-0.18/libMoaggCore/include/MathTools.h
===================================================================
--- moagg-0.18.orig/libMoaggCore/include/MathTools.h	2007-07-01 14:18:14.000000000 +0100
+++ moagg-0.18/libMoaggCore/include/MathTools.h	2007-07-01 14:19:47.000000000 +0100
@@ -63,6 +63,9 @@
         double m_y;
     };
 
+    Vector operator+(const Vector &v1, const Vector &v2);
+    Vector operator-(const Vector &v1, const Vector &v2);
+
 
     //------------------------------------------------------------------------
     /**
Index: moagg-0.18/libMoaggCore/include/Tools.h
===================================================================
--- moagg-0.18.orig/libMoaggCore/include/Tools.h	2007-07-01 14:15:39.000000000 +0100
+++ moagg-0.18/libMoaggCore/include/Tools.h	2007-07-01 14:15:43.000000000 +0100
@@ -34,13 +34,8 @@
 
 
 //----------------------------------------------------------------------------
-#if defined __GNUC__ && ! defined __LINT__
-#define MIN(X, Y) ((X) <? (Y))
-#define MAX(X, Y) ((X) >? (Y))
-#else
 #define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
 #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
-#endif //!__GNUC__
 
 //----------------------------------------------------------------------------
 #define ZAP_POINTER(p) delete p; p = NULL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20070701/dfe28eba/attachment.pgp 


More information about the Pkg-games-devel mailing list