diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-29 20:50:27 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-29 20:50:27 +0000 |
commit | 5c160fad8347bee7f0df734ca7a9c263ce3e3dfe (patch) | |
tree | 8fd45a18c9cd1431e426bce4902a93f074daa32a /nuttx/lib | |
parent | b48508c844dbd558e728c5695136696b5dfea1fc (diff) | |
download | px4-firmware-5c160fad8347bee7f0df734ca7a9c263ce3e3dfe.tar.gz px4-firmware-5c160fad8347bee7f0df734ca7a9c263ce3e3dfe.tar.bz2 px4-firmware-5c160fad8347bee7f0df734ca7a9c263ce3e3dfe.zip |
libm compilation fixes from Darcy Gong
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5275 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
48 files changed, 48 insertions, 48 deletions
diff --git a/nuttx/lib/math/Make.defs b/nuttx/lib/math/Make.defs index 8e2e60f12..73d0be6f3 100644 --- a/nuttx/lib/math/Make.defs +++ b/nuttx/lib/math/Make.defs @@ -44,7 +44,7 @@ CSRCS += lib_sinf.c lib_sinhf.c lib_sqrtf.c lib_tanf.c lib_tanhf.c CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_ceil.c lib_cos.c CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_floor.c lib_fmod.c lib_frexp.c -CRRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c +CSRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c CSRCS += lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c CSRCS += lib_acosl.c lib_asinl.c lib_atan2l.c lib_atanl.c lib_ceill.c lib_cosl.c diff --git a/nuttx/lib/math/lib_acos.c b/nuttx/lib/math/lib_acos.c index 4c5aa67c0..d5ec36b9f 100644 --- a/nuttx/lib/math/lib_acos.c +++ b/nuttx/lib/math/lib_acos.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double acos(double x) { return (M_PI_2 - asin(x)); diff --git a/nuttx/lib/math/lib_acosl.c b/nuttx/lib/math/lib_acosl.c index 3b6fa8aa9..911330577 100644 --- a/nuttx/lib/math/lib_acosl.c +++ b/nuttx/lib/math/lib_acosl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double acosl(long double x) { return (M_PI_2 - asinl(x)); diff --git a/nuttx/lib/math/lib_asin.c b/nuttx/lib/math/lib_asin.c index 1469d1ed8..61b953531 100644 --- a/nuttx/lib/math/lib_asin.c +++ b/nuttx/lib/math/lib_asin.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double asin(double x) { long double y, y_sin, y_cos; diff --git a/nuttx/lib/math/lib_asinl.c b/nuttx/lib/math/lib_asinl.c index bd1cb70ee..dbb2bc3a2 100644 --- a/nuttx/lib/math/lib_asinl.c +++ b/nuttx/lib/math/lib_asinl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double asinl(long double x) { long double y, y_sin, y_cos; diff --git a/nuttx/lib/math/lib_atan.c b/nuttx/lib/math/lib_atan.c index 2b7f6e3a6..b4db8fb31 100644 --- a/nuttx/lib/math/lib_atan.c +++ b/nuttx/lib/math/lib_atan.c @@ -40,7 +40,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double atan(double x) { return asin(x / sqrt(x * x + 1)); diff --git a/nuttx/lib/math/lib_atan2.c b/nuttx/lib/math/lib_atan2.c index bfb33657c..82d1f47ec 100644 --- a/nuttx/lib/math/lib_atan2.c +++ b/nuttx/lib/math/lib_atan2.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double atan2(double y, double x) { if (y == 0.0) diff --git a/nuttx/lib/math/lib_atan2l.c b/nuttx/lib/math/lib_atan2l.c index d7891b628..07fcd9669 100644 --- a/nuttx/lib/math/lib_atan2l.c +++ b/nuttx/lib/math/lib_atan2l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double atan2l(long double y, long double x) { diff --git a/nuttx/lib/math/lib_atanl.c b/nuttx/lib/math/lib_atanl.c index c8fa239f9..0fa203098 100644 --- a/nuttx/lib/math/lib_atanl.c +++ b/nuttx/lib/math/lib_atanl.c @@ -40,7 +40,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double atanl(long double x) { return asinl(x / sqrtl(x * x + 1)); diff --git a/nuttx/lib/math/lib_ceil.c b/nuttx/lib/math/lib_ceil.c index 12e223128..0e7602996 100644 --- a/nuttx/lib/math/lib_ceil.c +++ b/nuttx/lib/math/lib_ceil.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double ceil(double x) { modf(x, &x); diff --git a/nuttx/lib/math/lib_ceill.c b/nuttx/lib/math/lib_ceill.c index 5a0010aa2..a24b56f68 100644 --- a/nuttx/lib/math/lib_ceill.c +++ b/nuttx/lib/math/lib_ceill.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double ceill(long double x) { modfl(x, &x); diff --git a/nuttx/lib/math/lib_cos.c b/nuttx/lib/math/lib_cos.c index 09808bd9f..aa672b855 100644 --- a/nuttx/lib/math/lib_cos.c +++ b/nuttx/lib/math/lib_cos.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double cos(double x) { return sin(x + M_PI_2); diff --git a/nuttx/lib/math/lib_cosh.c b/nuttx/lib/math/lib_cosh.c index de4f42d7a..1be44d293 100644 --- a/nuttx/lib/math/lib_cosh.c +++ b/nuttx/lib/math/lib_cosh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double cosh(double x) { x = exp(x); diff --git a/nuttx/lib/math/lib_coshl.c b/nuttx/lib/math/lib_coshl.c index d43912745..4576b8876 100644 --- a/nuttx/lib/math/lib_coshl.c +++ b/nuttx/lib/math/lib_coshl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double coshl(long double x) { x = expl(x); diff --git a/nuttx/lib/math/lib_cosl.c b/nuttx/lib/math/lib_cosl.c index 5b7321812..25dd86139 100644 --- a/nuttx/lib/math/lib_cosl.c +++ b/nuttx/lib/math/lib_cosl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double cosl(long double x) { return sinl(x + M_PI_2); diff --git a/nuttx/lib/math/lib_exp.c b/nuttx/lib/math/lib_exp.c index 350229860..1e3120453 100644 --- a/nuttx/lib/math/lib_exp.c +++ b/nuttx/lib/math/lib_exp.c @@ -37,7 +37,7 @@ #include "lib_internal.h" -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE /************************************************************************ * Private Data diff --git a/nuttx/lib/math/lib_expl.c b/nuttx/lib/math/lib_expl.c index cd5e6a500..053103c9b 100644 --- a/nuttx/lib/math/lib_expl.c +++ b/nuttx/lib/math/lib_expl.c @@ -37,7 +37,7 @@ #include "lib_internal.h" -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE /************************************************************************ * Private Data diff --git a/nuttx/lib/math/lib_fabs.c b/nuttx/lib/math/lib_fabs.c index a635b0b41..ff99ceb64 100644 --- a/nuttx/lib/math/lib_fabs.c +++ b/nuttx/lib/math/lib_fabs.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double fabs(double x) { return ((x < 0) ? -x : x); diff --git a/nuttx/lib/math/lib_fabsl.c b/nuttx/lib/math/lib_fabsl.c index f1e37e3f1..5313d897d 100644 --- a/nuttx/lib/math/lib_fabsl.c +++ b/nuttx/lib/math/lib_fabsl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double fabsl(long double x) { return ((x < 0) ? -x : x); diff --git a/nuttx/lib/math/lib_floor.c b/nuttx/lib/math/lib_floor.c index 895b9a503..f0c4477a0 100644 --- a/nuttx/lib/math/lib_floor.c +++ b/nuttx/lib/math/lib_floor.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double floor(double x) { modf(x, &x); diff --git a/nuttx/lib/math/lib_floorl.c b/nuttx/lib/math/lib_floorl.c index 2c7011297..e38ce80ed 100644 --- a/nuttx/lib/math/lib_floorl.c +++ b/nuttx/lib/math/lib_floorl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double floorl(long double x) { modfl(x, &x); diff --git a/nuttx/lib/math/lib_fmod.c b/nuttx/lib/math/lib_fmod.c index c55151d75..939e7e18a 100644 --- a/nuttx/lib/math/lib_fmod.c +++ b/nuttx/lib/math/lib_fmod.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double fmod(double x, double div) { double n0; diff --git a/nuttx/lib/math/lib_fmodl.c b/nuttx/lib/math/lib_fmodl.c index c9b3ca784..51c5e95ec 100644 --- a/nuttx/lib/math/lib_fmodl.c +++ b/nuttx/lib/math/lib_fmodl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double fmodl(long double x, long double div) { long double n0; diff --git a/nuttx/lib/math/lib_frexp.c b/nuttx/lib/math/lib_frexp.c index 6de67f8b5..56feee863 100644 --- a/nuttx/lib/math/lib_frexp.c +++ b/nuttx/lib/math/lib_frexp.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double frexp(double x, int *exponent) { *exponent = (int)ceil(log2(x)); diff --git a/nuttx/lib/math/lib_frexpl.c b/nuttx/lib/math/lib_frexpl.c index 7a0d3c408..87708ad86 100644 --- a/nuttx/lib/math/lib_frexpl.c +++ b/nuttx/lib/math/lib_frexpl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double frexpl(long double x, int *exponent) { *exponent = (int)ceill(log2(x)); diff --git a/nuttx/lib/math/lib_ldexp.c b/nuttx/lib/math/lib_ldexp.c index ca428dc07..4c7b2b721 100644 --- a/nuttx/lib/math/lib_ldexp.c +++ b/nuttx/lib/math/lib_ldexp.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double ldexp(double x, int n) { return (x * pow(2.0, (double)n)); diff --git a/nuttx/lib/math/lib_ldexpl.c b/nuttx/lib/math/lib_ldexpl.c index 0f77bff11..b9a0f4a86 100644 --- a/nuttx/lib/math/lib_ldexpl.c +++ b/nuttx/lib/math/lib_ldexpl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double ldexpl(long double x, int n) { return (x * powl(2.0, (long double)n)); diff --git a/nuttx/lib/math/lib_libexpi.c b/nuttx/lib/math/lib_libexpi.c index d2bb971a2..1ec947a71 100644 --- a/nuttx/lib/math/lib_libexpi.c +++ b/nuttx/lib/math/lib_libexpi.c @@ -77,7 +77,7 @@ static double _expi_square_tbl[11] = * Public Functions ************************************************************************/ -static double lib_expi(size_t n) +double lib_expi(size_t n) { size_t i; double val; diff --git a/nuttx/lib/math/lib_log.c b/nuttx/lib/math/lib_log.c index 4dd51e87c..1350ba4fe 100644 --- a/nuttx/lib/math/lib_log.c +++ b/nuttx/lib/math/lib_log.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log(double x) { double y, y_old, ey, epsilon; diff --git a/nuttx/lib/math/lib_log10.c b/nuttx/lib/math/lib_log10.c index a6534407e..47854fca4 100644 --- a/nuttx/lib/math/lib_log10.c +++ b/nuttx/lib/math/lib_log10.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log10(double x) { return (log(x) / M_LN10); diff --git a/nuttx/lib/math/lib_log10l.c b/nuttx/lib/math/lib_log10l.c index 8702ed5a5..65892262a 100644 --- a/nuttx/lib/math/lib_log10l.c +++ b/nuttx/lib/math/lib_log10l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double log10l(long double x) { return (logl(x) / M_LN10); diff --git a/nuttx/lib/math/lib_log2.c b/nuttx/lib/math/lib_log2.c index 377d78e29..0aa1e8010 100644 --- a/nuttx/lib/math/lib_log2.c +++ b/nuttx/lib/math/lib_log2.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double log2(double x) { return (log(x) / M_LN2); diff --git a/nuttx/lib/math/lib_log2l.c b/nuttx/lib/math/lib_log2l.c index cd25c32f1..21d26d4d7 100644 --- a/nuttx/lib/math/lib_log2l.c +++ b/nuttx/lib/math/lib_log2l.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double log2l(long double x) { return (logl(x) / M_LN2); diff --git a/nuttx/lib/math/lib_logl.c b/nuttx/lib/math/lib_logl.c index df0031943..577f9cee2 100644 --- a/nuttx/lib/math/lib_logl.c +++ b/nuttx/lib/math/lib_logl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double logl(long double x) { long double y, y_old, ey, epsilon; diff --git a/nuttx/lib/math/lib_modf.c b/nuttx/lib/math/lib_modf.c index 3b33cde42..9dc6284c2 100644 --- a/nuttx/lib/math/lib_modf.c +++ b/nuttx/lib/math/lib_modf.c @@ -36,7 +36,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double modf(double x, double *iptr) { if (fabs(x) >= 4503599627370496.0) diff --git a/nuttx/lib/math/lib_modfl.c b/nuttx/lib/math/lib_modfl.c index 55b17eae6..3b04571f3 100644 --- a/nuttx/lib/math/lib_modfl.c +++ b/nuttx/lib/math/lib_modfl.c @@ -39,7 +39,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double modfl(long double x, long double *iptr) { if (fabs(x) >= 4503599627370496.0) diff --git a/nuttx/lib/math/lib_pow.c b/nuttx/lib/math/lib_pow.c index 66f6a2d2e..af0a55d32 100644 --- a/nuttx/lib/math/lib_pow.c +++ b/nuttx/lib/math/lib_pow.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double pow(double b, double e) { return exp(e * log(b)); diff --git a/nuttx/lib/math/lib_powl.c b/nuttx/lib/math/lib_powl.c index 6a820df26..f5fbf042e 100644 --- a/nuttx/lib/math/lib_powl.c +++ b/nuttx/lib/math/lib_powl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double powl(long double b, long double e) { return expl(e * logl(b)); diff --git a/nuttx/lib/math/lib_sin.c b/nuttx/lib/math/lib_sin.c index 2d21d2309..c04d6b88b 100644 --- a/nuttx/lib/math/lib_sin.c +++ b/nuttx/lib/math/lib_sin.c @@ -35,7 +35,7 @@ #include <sys/types.h> #include <math.h> -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE /************************************************************************ * Private Data diff --git a/nuttx/lib/math/lib_sinh.c b/nuttx/lib/math/lib_sinh.c index a22652302..f33852433 100644 --- a/nuttx/lib/math/lib_sinh.c +++ b/nuttx/lib/math/lib_sinh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double sinh(double x) { x = exp(x); diff --git a/nuttx/lib/math/lib_sinhl.c b/nuttx/lib/math/lib_sinhl.c index 442586ffb..b0fea2914 100644 --- a/nuttx/lib/math/lib_sinhl.c +++ b/nuttx/lib/math/lib_sinhl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double sinhl(long double x) { x = expl(x); diff --git a/nuttx/lib/math/lib_sinl.c b/nuttx/lib/math/lib_sinl.c index f8d9e00ed..a69b548cb 100644 --- a/nuttx/lib/math/lib_sinl.c +++ b/nuttx/lib/math/lib_sinl.c @@ -35,7 +35,7 @@ #include <sys/types.h> #include <math.h> -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE /************************************************************************ * Private Data diff --git a/nuttx/lib/math/lib_sqrt.c b/nuttx/lib/math/lib_sqrt.c index 96f0d5409..d77997f7c 100644 --- a/nuttx/lib/math/lib_sqrt.c +++ b/nuttx/lib/math/lib_sqrt.c @@ -41,7 +41,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double sqrt(double x) { long double y, y1; diff --git a/nuttx/lib/math/lib_sqrtl.c b/nuttx/lib/math/lib_sqrtl.c index f305092e7..6674fe50f 100644 --- a/nuttx/lib/math/lib_sqrtl.c +++ b/nuttx/lib/math/lib_sqrtl.c @@ -41,7 +41,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double sqrtl(long double x) { long double y, y1; diff --git a/nuttx/lib/math/lib_tan.c b/nuttx/lib/math/lib_tan.c index a9a1d8ebe..bce14b327 100644 --- a/nuttx/lib/math/lib_tan.c +++ b/nuttx/lib/math/lib_tan.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double tan(double x) { return (sin(x) / cos(x)); diff --git a/nuttx/lib/math/lib_tanh.c b/nuttx/lib/math/lib_tanh.c index 5cc1d9176..46fddd06d 100644 --- a/nuttx/lib/math/lib_tanh.c +++ b/nuttx/lib/math/lib_tanh.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_DOUBLE +#ifdef CONFIG_HAVE_DOUBLE double tanh(double x) { double x0 = exp(x); diff --git a/nuttx/lib/math/lib_tanhl.c b/nuttx/lib/math/lib_tanhl.c index 8b897451e..23c11d667 100644 --- a/nuttx/lib/math/lib_tanhl.c +++ b/nuttx/lib/math/lib_tanhl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double tanhl(long double x) { long double x0 = exp(x); diff --git a/nuttx/lib/math/lib_tanl.c b/nuttx/lib/math/lib_tanl.c index c4c3712c1..4973aa073 100644 --- a/nuttx/lib/math/lib_tanl.c +++ b/nuttx/lib/math/lib_tanl.c @@ -38,7 +38,7 @@ * Public Functions ************************************************************************/ -#if CONFIG_HAVE_LONG_DOUBLE +#ifdef CONFIG_HAVE_LONG_DOUBLE long double tanl(long double x) { return (sinl(x) / cosl(x)); |