Tue Feb 25 01:45:53 2014 UTC ()
Fix ambiguous math on SunOS
(wiedi)
diff -r1.10 -r1.11 pkgsrc/audio/libvisual-plugins/distinfo
diff -r0 -r1.1 pkgsrc/audio/libvisual-plugins/patches/patch-plugins_actor_G-Force_Common_GeneralTools_UtilStr.cpp
diff -r0 -r1.1 pkgsrc/audio/libvisual-plugins/patches/patch-plugins_actor_G-Force_Common_UI_LineXX.cpp
diff -r0 -r1.1 pkgsrc/audio/libvisual-plugins/patches/patch-plugins_actor_corona_corona.cpp
--- pkgsrc/audio/libvisual-plugins/distinfo 2011/08/28 23:56:07 1.10
+++ pkgsrc/audio/libvisual-plugins/distinfo 2014/02/25 01:45:53 1.11
| @@ -1,12 +1,15 @@ | | | @@ -1,12 +1,15 @@ |
1 | $NetBSD: distinfo,v 1.10 2011/08/28 23:56:07 dholland Exp $ | | 1 | $NetBSD: distinfo,v 1.11 2014/02/25 01:45:53 wiedi Exp $ |
2 | | | 2 | |
3 | SHA1 (libvisual-plugins-0.4.0.tar.gz) = 20490573c282d900ec0bd05133cb3707640254f5 | | 3 | SHA1 (libvisual-plugins-0.4.0.tar.gz) = 20490573c282d900ec0bd05133cb3707640254f5 |
4 | RMD160 (libvisual-plugins-0.4.0.tar.gz) = f7a82f4a9e4dec3e877833612ece570ffbf2404d | | 4 | RMD160 (libvisual-plugins-0.4.0.tar.gz) = f7a82f4a9e4dec3e877833612ece570ffbf2404d |
5 | Size (libvisual-plugins-0.4.0.tar.gz) = 828631 bytes | | 5 | Size (libvisual-plugins-0.4.0.tar.gz) = 828631 bytes |
6 | SHA1 (patch-aa) = 9c84c7d8af69d603ea8ce4077247a217952c0cb3 | | 6 | SHA1 (patch-aa) = 9c84c7d8af69d603ea8ce4077247a217952c0cb3 |
7 | SHA1 (patch-ab) = 31a380ed59ed9eed1e5516c44fec54c1e7dcf25c | | 7 | SHA1 (patch-ab) = 31a380ed59ed9eed1e5516c44fec54c1e7dcf25c |
8 | SHA1 (patch-ac) = b431acd28d9ff7c8bf5a8655fe4969f08ad80772 | | 8 | SHA1 (patch-ac) = b431acd28d9ff7c8bf5a8655fe4969f08ad80772 |
9 | SHA1 (patch-ad) = 9f9adc7bc9074b6474b83a245be67f1db753d645 | | 9 | SHA1 (patch-ad) = 9f9adc7bc9074b6474b83a245be67f1db753d645 |
10 | SHA1 (patch-ae) = ce54b7682f0d7a184a15392ee8f3a7cd2510be13 | | 10 | SHA1 (patch-ae) = ce54b7682f0d7a184a15392ee8f3a7cd2510be13 |
11 | SHA1 (patch-af) = 35e2b6517a7c7bd5605fd6593a113f184d8dc1b3 | | 11 | SHA1 (patch-af) = 35e2b6517a7c7bd5605fd6593a113f184d8dc1b3 |
| | | 12 | SHA1 (patch-plugins_actor_G-Force_Common_GeneralTools_UtilStr.cpp) = 6dfb4d2d8ba5ed6be37523b66515df630bfba604 |
| | | 13 | SHA1 (patch-plugins_actor_G-Force_Common_UI_LineXX.cpp) = f0e527dd7bc2918fbab00846cbf3c7c882ba82eb |
| | | 14 | SHA1 (patch-plugins_actor_corona_corona.cpp) = 89292f12be75a59a62f7a52c660a1146fda8f1e5 |
12 | SHA1 (patch-plugins_morph_flash_morph__flash_c) = 94d696aa43213fa43fb98a563cdc040d5fe9a92c | | 15 | SHA1 (patch-plugins_morph_flash_morph__flash_c) = 94d696aa43213fa43fb98a563cdc040d5fe9a92c |
$NetBSD: patch-plugins_actor_G-Force_Common_GeneralTools_UtilStr.cpp,v 1.1 2014/02/25 01:45:53 wiedi Exp $
fix "pow() is ambiguous" on SunOS
--- plugins/actor/G-Force/Common/GeneralTools/UtilStr.cpp.orig 2005-12-06 10:48:28.000000000 +0000
+++ plugins/actor/G-Force/Common/GeneralTools/UtilStr.cpp
@@ -1213,7 +1213,7 @@ void UtilStr::SetFloatValue( float inVal
deci_digits = 10 - left_digits;
if ( deci_digits > inPercision )
deci_digits = inPercision;
- scale = pow( 10, deci_digits );
+ scale = pow( 10, (double) deci_digits );
SetValue( inValue * scale, scale, deci_digits ); }
else
Assign( "Overflow" );
$NetBSD: patch-plugins_actor_G-Force_Common_UI_LineXX.cpp,v 1.1 2014/02/25 01:45:53 wiedi Exp $
fix "sqrt(int) is ambiguous" on SunOS
--- plugins/actor/G-Force/Common/UI/LineXX.cpp.orig 2005-01-17 19:53:46.000000000 +0000
+++ plugins/actor/G-Force/Common/UI/LineXX.cpp
@@ -74,13 +74,13 @@
#if CLR_INTERP && P_SZ != 1
- long len = sqrt( dx * dx + dy * dy ) + 1;
+ long len = sqrt( (double) (dx * dx + dy * dy) ) + 1;
dR /= len;
dG /= len;
dB /= len;
color = __Clr( R, G, B );
#elif CLR_INTERP && P_SZ == 1
- long len = sqrt( dx * dx + dy * dy ) + 1;
+ long len = sqrt( (double) (dx * dx + dy * dy) ) + 1;
dR /= len;
color = __Clr( R, G, B );
#endif
@@ -154,7 +154,7 @@
for ( j = 0; j < tw; j++ ) {
long tmp = j - halfW;
- c_x = halfW - ( ( long ) sqrt( halfW * halfW - tmp * tmp ) );
+ c_x = halfW - ( ( long ) sqrt((double) (halfW * halfW - tmp * tmp) ) );
center = basePtr + (j-halfW) * mBytesPerRow;
for ( int k = c_x; k < tw - c_x; k++ ){
((PIXTYPE*) center)[k-halfW] = color;
$NetBSD: patch-plugins_actor_corona_corona.cpp,v 1.1 2014/02/25 01:45:53 wiedi Exp $
fix "sqrt(int) is ambiguous" on SunOS
--- plugins/actor/corona/corona.cpp.orig 2006-02-05 18:47:26.000000000 +0000
+++ plugins/actor/corona/corona.cpp
@@ -118,7 +118,7 @@ bool Corona::setUpSurface(int width, int
}
// Change the number of particles
- int newsize = (int) (::sqrt(m_width * m_height) * 3.0);
+ int newsize = (int) (::sqrt((double) (m_width * m_height)) * 3.0);
if (newsize < 2000) newsize = 2000;
int oldsize = (int) nbParticules;
nbParticules = newsize;