Compiler: Fix undefined symbol: pow10 (#615)
* Compiler: Fix undefined symbol: pow10 * Add version check * Remove deprecated pow10
This commit is contained in:
parent
75cf5f55f9
commit
77eb33d5f2
|
@ -600,13 +600,6 @@ static int htoi(cell *val,const unsigned char *curptr)
|
||||||
return (int)(ptr-curptr);
|
return (int)(ptr-curptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined __APPLE__
|
|
||||||
static double pow10(double d)
|
|
||||||
{
|
|
||||||
return pow(10, d);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ftoi
|
/* ftoi
|
||||||
*
|
*
|
||||||
* Attempts to interpret a numeric symbol as a rational number, either as
|
* Attempts to interpret a numeric symbol as a rational number, either as
|
||||||
|
@ -682,11 +675,7 @@ static int ftoi(cell *val,const unsigned char *curptr)
|
||||||
exp=(exp*10)+(*ptr-'0');
|
exp=(exp*10)+(*ptr-'0');
|
||||||
ptr++;
|
ptr++;
|
||||||
} /* while */
|
} /* while */
|
||||||
#if defined __GNUC__
|
|
||||||
fmult=pow10(exp*sign);
|
|
||||||
#else
|
|
||||||
fmult=pow(10,exp*sign);
|
fmult=pow(10,exp*sign);
|
||||||
#endif
|
|
||||||
fnum *= fmult;
|
fnum *= fmult;
|
||||||
dnum *= (unsigned long)(fmult+0.5);
|
dnum *= (unsigned long)(fmult+0.5);
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user