diff options
author | Elliott Hughes <enh@google.com> | 2018-07-24 00:01:52 +0000 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-07-24 10:36:00 -0700 |
commit | ab528076854c7bc2bb5ad30ead5aadf630fb7de8 (patch) | |
tree | 442c4c850041694a4139f8176b1eb86cf78f4a25 /libc/include/math.h | |
parent | 94ab04c17a0e9f412b7de079f2ef35f39c7f06fc (diff) |
Update to FreeBSD libm r336665.
This reverts commit 253a8306316cedfd6fd3e3a169fbffe4cac04035 and moves
us forward to a revision that contains fixes for the problem with the
previous attempt.
This also makes sincos(3)/sincosf(3)/sincosl(3) available to `_BSD_SOURCE`
as well as `_GNU_SOURCE`.
The new FreeBSD libm code requires the FreeBSD `__CONCAT` macro, and all
our existing callers are FreeBSD too, so update that.
There's also an assumption that <complex.h> drags in <math.h> which isn't
true for us, so work around that with `-include` in the makefile. This
then causes clang to recognize a bug -- returning from a void function --
in our fake (LP32) sincosl(3), so fix that too.
Bug: http://b/111710419
Change-Id: I84703ad844f8afde6ec6b11604ab3c096ccb62c3
Test: ran tests
Diffstat (limited to 'libc/include/math.h')
-rw-r--r-- | libc/include/math.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/include/math.h b/libc/include/math.h index 57ca2600a..beb66a7fd 100644 --- a/libc/include/math.h +++ b/libc/include/math.h @@ -384,6 +384,9 @@ float ynf(int __n, float __x); float gammaf_r(float __x, int* __sign); float lgammaf_r(float __x, int* __sign); float significandf(float __x); +void sincos(double __x, double* __sin, double* __cos); +void sincosf(float __x, float* __sin, float* __cos); +void sincosl(long double __x, long double* __sin, long double* __cos); #endif /* GNU extensions. */ @@ -402,9 +405,6 @@ float significandf(float __x); #define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */ #define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */ #define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */ -void sincos(double __x, double* __sin, double* __cos); -void sincosf(float __x, float* __sin, float* __cos); -void sincosl(long double __x, long double* __sin, long double* __cos); #endif __END_DECLS |