incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1388314 - /incubator/ooo/trunk/main/vigra/vigra1.6.0.patch
Date Fri, 21 Sep 2012 03:34:17 GMT
Author: pfg
Date: Fri Sep 21 03:34:16 2012
New Revision: 1388314

URL: http://svn.apache.org/viewvc?rev=1388314&view=rev
Log:
Vigra: add missing mathutil.hxx patch

Modified:
    incubator/ooo/trunk/main/vigra/vigra1.6.0.patch

Modified: incubator/ooo/trunk/main/vigra/vigra1.6.0.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vigra/vigra1.6.0.patch?rev=1388314&r1=1388313&r2=1388314&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vigra/vigra1.6.0.patch (original)
+++ incubator/ooo/trunk/main/vigra/vigra1.6.0.patch Fri Sep 21 03:34:16 2012
@@ -739,6 +739,89 @@ diff -uprN misc/vigra1.6.0/include/vigra
          }
          calculateHermitePolynomial();
      }
+diff -uprN misc/vigra1.6.0/include/vigra/mathutil.hxx misc/build/vigra1.6.0/include/vigra/mathutil.hxx
+--- misc/vigra1.6.0/include/vigra/mathutil.hxx	2008-08-13 08:15:38.000000000 -0500
++++ misc/build/vigra1.6.0/include/vigra/mathutil.hxx	2012-09-20 22:05:29.000000000 -0500
+@@ -88,7 +88,7 @@ using VIGRA_CSTD::ceil;  
+ 
+ // import abs(float), abs(double), abs(long double) from <cmath>
+ //    and abs(int), abs(long), abs(long long) from <cstdlib>
+-using std::abs;  
++//using std::abs;  
+ 
+ // define the missing variants of abs() to avoid 'ambigous overload'
+ // errors in template functions
+@@ -100,10 +100,39 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned char)
+ VIGRA_DEFINE_UNSIGNED_ABS(unsigned short)
+ VIGRA_DEFINE_UNSIGNED_ABS(unsigned int)
+ VIGRA_DEFINE_UNSIGNED_ABS(unsigned long)
++#ifdef VIGRA_HAS_LONG_LONG
+ VIGRA_DEFINE_UNSIGNED_ABS(unsigned long long)
++#endif
+ 
+ #undef VIGRA_DEFINE_UNSIGNED_ABS
+ 
++#define VIGRA_DEFINE_SIGNED_ABS(T) \
++    inline T abs(T t) { return (T)abs(t); }
++#define VIGRA_DEFINE_SIGNED_LABS(T) \
++    inline T abs(T t) { return (T)labs(t); }
++#define VIGRA_DEFINE_SIGNED_LLABS(T) \
++    inline T abs(T t) { return (T)llabs(t); }
++#define VIGRA_DEFINE_FABS(T) \
++    inline T abs(T t) { return (T)fabs(t); }
++
++VIGRA_DEFINE_SIGNED_ABS(signed char)
++VIGRA_DEFINE_SIGNED_ABS(signed short)
++VIGRA_DEFINE_SIGNED_ABS(signed int)
++VIGRA_DEFINE_SIGNED_LABS(signed long)
++#ifdef VIGRA_HAS_LONG_LONG
++VIGRA_DEFINE_SIGNED_LLABS(signed long long)
++#endif
++VIGRA_DEFINE_FABS(float)
++VIGRA_DEFINE_FABS(double)
++#ifdef VIGRA_HAS_LONG_DOUBLE
++VIGRA_DEFINE_FABS(long double)
++#endif
++
++#undef VIGRA_DEFINE_SIGNED_ABS
++#undef VIGRA_DEFINE_SIGNED_LABS
++#undef VIGRA_DEFINE_SIGNED_LLABS
++#undef VIGRA_DEFINE_FABS
++
+ #define VIGRA_DEFINE_MISSING_ABS(T) \
+     inline T abs(T t) { return t < 0 ? -t : t; }
+ 
+@@ -134,12 +163,14 @@ inline double round(double t)
+                 : ceil(t - 0.5);
+ }
+ 
++#ifdef VIGRA_HAS_LONG_DOUBLE
+ inline long double round(long double t)
+ {
+      return t >= 0.0
+                 ? floor(t + 0.5)
+                 : ceil(t - 0.5);
+ }
++#endif
+ 
+     /*! Round up to the nearest power of 2.
+ 
+@@ -440,9 +471,15 @@ VIGRA_DEFINE_NORM(int)
+ VIGRA_DEFINE_NORM(unsigned int)
+ VIGRA_DEFINE_NORM(long)
+ VIGRA_DEFINE_NORM(unsigned long)
++#ifdef VIGRA_HAS_LONG_LONG
++VIGRA_DEFINE_NORM(long long)
++VIGRA_DEFINE_NORM(unsigned long long)
++#endif
+ VIGRA_DEFINE_NORM(float)
+ VIGRA_DEFINE_NORM(double)
++#ifdef VIGRA_HAS_LONG_DOUBLE
+ VIGRA_DEFINE_NORM(long double)
++#endif
+ 
+ #undef VIGRA_DEFINE_NORM
+ 
 diff -uprN misc/vigra1.6.0/include/vigra/numerictraits.hxx misc/build/vigra1.6.0/include/vigra/numerictraits.hxx
 --- misc/vigra1.6.0/include/vigra/numerictraits.hxx	2008-08-13 08:15:39.000000000 -0500
 +++ misc/build/vigra1.6.0/include/vigra/numerictraits.hxx	2012-09-19 17:30:24.000000000 -0500



Mime
View raw message