From: Vlad-Andrei BĂDOIU (78692) Date: Wed, 8 Jan 2020 14:17:32 +0000 (+0000) Subject: sincosl.c: Import from musl X-Git-Tag: RELEASE-0.4~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=556819336cb66c5a40a33fe1c66a4fb8b355722a;p=unikraft%2Flibs%2Fnewlib.git sincosl.c: Import from musl Copied as is from the official musl git mirror git://git.musl-libc.org/musl, commit 6fcb440d. We only keep the non optimized definition since all the long double math functions from newlib are wrappers over double. Signed-off-by: Vlad-Andrei Badoiu Reviewed-by: Felipe Huici --- diff --git a/Makefile.uk b/Makefile.uk index 17d8d7a..a963e82 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -132,6 +132,7 @@ LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/mntent.c LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/misc/syslog.c LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/termios/tcsetattr.c LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/termios/tcgetattr.c +LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/math/sincosl.c ifeq ($(CONFIG_LIBNEWLIBC_CRYPT),y) LIBNEWLIBGLUE_CFLAGS-y += -Wno-missing-braces -Wno-sign-compare -Wno-char-subscripts diff --git a/musl-imported/src/math/sincosl.c b/musl-imported/src/math/sincosl.c new file mode 100644 index 0000000..f7586df --- /dev/null +++ b/musl-imported/src/math/sincosl.c @@ -0,0 +1,12 @@ +#define _GNU_SOURCE + +#include + +void sincosl(long double x, long double *sin, long double *cos) +{ + double sind, cosd; + + sincos(x, &sind, &cosd); + *sin = sind; + *cos = cosd; +}