Commit cb909f79 authored by Andreas Tille's avatar Andreas Tille

Turn suspicious definitions into comments after #ifndef HAS_LOG2 failed

parent d986f73a
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 30 Aug 2016 08:25:06 +0200
Bug-Debian: https://bugs.debian.org/835074
Description: Try to deal with duplicate definition of log2 but failed
Description: Deal with duplicate definition of log2
Remark: Even after including config.h
#ifndef CLUSTAL_OMEGA_HAVE_LOG2
worked in src/hhalign/util-C.h - no idea why. So the definitions
were simply turned into comments.
--- a/src/hhalign/util-C.h
+++ b/src/hhalign/util-C.h
@@ -51,7 +51,9 @@ inline int iround(double x) {return int(
@@ -51,8 +51,10 @@ inline int iround(double x) {return int(
inline double fmean(double x, double y, double d) { return pow( (pow(x,d)+pow(y,d))/2 ,1./d);}
// log base 2
+#ifndef HAVE_LOG2
+/*
inline float log2(float x) {return (x<=0? (float)(-100000):1.442695041*log(x));}
+#endif
inline float log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
+*/
/////////////////////////////////////////////////////////////////////////////////////
--- a/src/clustal/mbed.c
+++ b/src/clustal/mbed.c
@@ -88,7 +88,7 @@ static const int RESTARTS_PER_SPLIT = 10
#define USE_KMEANS_LLOYDS 0
-#ifndef HAVE_LOG2
+#ifndef CLUSTAL_OMEGA_HAVE_LOG2
#define log2(x) (log(x) / 0.69314718055994530942)
#endif
#define NUMBER_OF_SEEDS(n) pow(log2(((double)n)), 2)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment