From de9ea5223d9703234f5e887553c75a6f10c68e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 21 Mar 2008 01:25:37 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Other non-defined mathematical function management. git-svn-id: svn://localhost/gambas/trunk@1216 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_math.c | 4 ++++ main/gbx/gbx_math.h | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/main/gbx/gbx_math.c b/main/gbx/gbx_math.c index c08c4f41b..d5dc05a5b 100644 --- a/main/gbx/gbx_math.c +++ b/main/gbx/gbx_math.c @@ -67,6 +67,10 @@ long double powl(long double x, long double y) return pow((double) x, (double) y); } +#endif + +#ifdef OS_CYGWIN + long double modfl(long double x, long double *p) { double r, dp; diff --git a/main/gbx/gbx_math.h b/main/gbx/gbx_math.h index c92205b54..60c2f3d13 100644 --- a/main/gbx/gbx_math.h +++ b/main/gbx/gbx_math.h @@ -44,16 +44,23 @@ double ang(double x, double y); void randomize(bool set, uint seed); double rnd(void); -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#if defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_CYGWIN) double exp10(double x); +#ifdef log2 +#undef log2 +#endif double log2(double x); #endif -#ifdef OS_OPENBSD +#if defined(OS_OPENBSD) || defined(OS_CYGWIN) double exp2(double x); long double log10l(long double x); long double fabsl(long double x); long double powl(long double x, long double y); #endif +#ifdef OS_CYGWIN +long double modfl(long double x, long double *p); +#endif + #endif