From 691ae9f8d46c50a0a230fc284f6111c4a856eb22 Mon Sep 17 00:00:00 2001 From: Juice Date: Thu, 17 Oct 2019 16:43:26 +0300 Subject: [PATCH] Compiler: Fix undefined symbol: pow10 (#615) (#759) * Compiler: Fix undefined symbol: pow10 * Add version check * Remove deprecated pow10 (cherry picked from commit 77eb33d5f244effebacfcf43909bd16078214fa3) --- compiler/libpc300/sc2.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/compiler/libpc300/sc2.c b/compiler/libpc300/sc2.c index 09ce6621..5d7b6a84 100755 --- a/compiler/libpc300/sc2.c +++ b/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 */