From:
[email protected]
Package: hydrogen
Severity: normal
Tags: patch
When building 'hydrogen' with gcc-3.4 I get the following error:
g++ -DHAVE_CONFIG_H -I. -I. -I.. -DQT_THREAD_SUPPORT -D_REENTRANT -O3 -c -o Hydrogen.o `test -f 'Hydrogen.cpp' || echo './'`Hydrogen.cpp
Hydrogen.cpp: In member function `void Hydrogen::setTapTempo(float)': Hydrogen.cpp:2505: error: call of overloaded `abs(float)' is ambiguous /usr/include/stdlib.h:748: note: candidates are: int abs(int) /usr/include/c++/3.4/cstdlib:153: note: long long int __gnu_cxx::abs(long long int)
/usr/include/c++/3.4/cstdlib:123: note: long int std::abs(long int)
make[3]: *** [Hydrogen.o] Error 1
make[3]: Leaving directory `/hydrogen-0.8.2/build-tree/hydrogen-0.8.2/lib'
With the attached patch 'hydrogen' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/hydrogen-0.8.2/debian/patches/01_gcc-3.4.patch ./debian/patches/01_gcc-3.4.patch
--- ../tmp-orig/hydrogen-0.8.2/debian/patches/01_gcc-3.4.patch 1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/01_gcc-3.4.patch 2004-08-17 09:16:59.393432313 +0200
@@ -0,0 +1,11 @@
+--- Hydrogen.cpp 2004-03-09 11:31:37.000000000 +0100
++++ hydrogen-0.8.2/lib/Hydrogen.cpp 2004-08-17 09:16:06.799427817 +0200
+@@ -2502,7 +2502,7 @@
+
+ float fBPM = 60000.0 / fInterval;
+
+- if ( abs(fOldBpm1 - fBPM) > 20 ) { // troppa differenza, niente media
++ if ( (fOldBpm1 - fBPM >= 0 ? fOldBpm1 - fBPM : fBPM - fOldBpm1) > 20 ) { // troppa differenza, niente media
+ fOldBpm1 = fBPM;
+ fOldBpm2 = fBPM;
+ fOldBpm3 = fBPM;
--
To UNSUBSCRIBE, email to
[email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)