[OpenSER-Devel] [ openser-Bugs-1795542 ] openser doesn't compile on
OS without pow()
SourceForge.net
noreply at sourceforge.net
Sat Sep 15 20:18:58 CEST 2007
Bugs item #1795542, was opened at 2007-09-15 14:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1795542&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: openser doesn't compile on OS without pow()
Initial Comment:
If the math library doesn't support pow, powf, powl - power functions, openser doesn't compile.
One solution would be to pass an extra directive via $EXTRA_DEFS before compiling:
EXTRA_DEFS=NO_POW make
The following patch will implement the NO_POW directive:
===================================================================
--- prime_hash.c (revision 2774)
+++ prime_hash.c (working copy)
@@ -131,7 +131,11 @@
limit = i;
for(i=INT_DIGIT_LIMIT - 1, j=0; i>limit; i--, j++) {
+#ifdef NO_POW
+ number += (source_number_s[i] - '0') * exp(log(10)*(j));
+#else
number += (source_number_s[i] - '0') * powl(10, j);
+#endif
}
LM_DBG("source_string is %.*s, source_number_s "
"is: %s, number is %llu\n", source_string->len, source_string->s,
Regards,
Ovidiu Sas
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1795542&group_id=139143
More information about the Devel
mailing list