Skip to content
Permalink
Browse files

Compiler: Fix undefined symbol: pow10 (#615) (#759)

* Compiler: Fix undefined symbol: pow10

* Add version check

* Remove deprecated pow10

(cherry picked from commit 77eb33d)
  • Loading branch information...
etojuice authored and Arkshine committed Oct 17, 2019
1 parent 6cecb34 commit 691ae9f8d46c50a0a230fc284f6111c4a856eb22
Showing with 1 addition and 12 deletions.
  1. +1 −12 compiler/libpc300/sc2.c
@@ -600,13 +600,6 @@ static int htoi(cell *val,const unsigned char *curptr)
return (int)(ptr-curptr);
}

#if defined __APPLE__
static double pow10(double d)
{
return pow(10, d);
}
#endif

/* ftoi
*
* 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');
ptr++;
} /* while */
#if defined __GNUC__
fmult=pow10(exp*sign);
#else
fmult=pow(10,exp*sign);
#endif
fmult=pow(10,exp*sign);
fnum *= fmult;
dnum *= (unsigned long)(fmult+0.5);
} /* if */

0 comments on commit 691ae9f

Please sign in to comment.
You can’t perform that action at this time.