[OpenSER-Devel] [ openser-Bugs-1795542 ] openser doesn't compile on
OS without pow()
SourceForge.net
noreply at sourceforge.net
Sun Sep 16 11:15:13 CEST 2007
Bugs item #1795542, was opened at 2007-09-15 21:18
Message generated for change (Comment added) made by bogdan_iancu
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
>Assigned to: Bogdan (bogdan_iancu)
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
----------------------------------------------------------------------
>Comment By: Bogdan (bogdan_iancu)
Date: 2007-09-16 12:15
Message:
Logged In: YES
user_id=1275325
Originator: NO
Hi Ovidiu,
I made a patch to get rid of the powl() function. It should compile now.
Regards,
Bogdan
----------------------------------------------------------------------
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