summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-19 17:56:57 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-19 17:56:57 -0500
commit13e8459232608f841d5e3f7171da80a8dfce7941 (patch)
treeee85245dec01e03f3197bc35a720d841e3a13d27 /src
parent98e02144dabec08c1d652a8cb233900516da6d23 (diff)
downloadmusl-13e8459232608f841d5e3f7171da80a8dfce7941.tar.gz
workaround gcc bug 46926 by providing a dumb sincos implementation
note that this library itself is built with -ffreestanding so sincos.c should not be miscompiled even if the gcc used to compile musl has this bug.
Diffstat (limited to 'src')
-rw-r--r--src/linux/sincos.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/linux/sincos.c b/src/linux/sincos.c
new file mode 100644
index 00000000..b69ffce9
--- /dev/null
+++ b/src/linux/sincos.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <math.h>
+
+void sincos(double t, double *y, double *x)
+{
+ *y = sin(t);
+ *x = cos(t);
+}