[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH 1/1] sincosl.c: Import from musl


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Wed, 8 Jan 2020 14:17:32 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8GHPu+4v9AYNnHgxDNlazh+i4TVFoTJ5qTOZmYa8dXk=; b=gzwj3lks/W7XhkEJv880K4pg8Qwa2MBs2JJDFWMcGxQxW1z8pVPNfKkicHWtq185JlEzLPDgk8kwYdXfhtdNgisOKQ0oFHn6TZ0pYvmA76MSLE/LEK4T5m6+coWLSoixb5lghat+XBJtJllaRnxzbe6VWhRQTdAKePMVXujs7sVXLyCoYn8xnq0+a9/iD9uwteCAbqXAH64awcGsALXu2nnt8hlWaprzpjcgLCM0slNluudJgPJm1s7ss+5p+fAd5D8OjkkgPA8ReL5giD9931pu/4GEQ+OkK2fFmrqqYm1nK3HWw4k7mWsl0F06ZT6mG1yXY7tCQ1amWTGoK5D6KQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cl9Wk3g+HMusUlxv6zrUMsesjf8FEeeI3MWoF4skpUReZvOKrU4ge3bm+Xg0BEw/WT5FkFnSJE0JWaPl6z6v8yCp2tQg6CNVRWyRiTiMfherzBfMTPwK2RIQA+kLXw1kZ00/pRUvCQUX6ZEWmOIB/6ZyFqdymdrcE1hTA1H+mXnTtClCJxFNwTVyo8HP3bh1zWzTghQckEN98xE/RV5MfNvhByK/QPTqi2/7Hq6rN6Ta5pGjmyRQ4fryu2GIW5ytBbmcmEkbyPtB7W1HrO3OjCOaE+MknHgsNLxnqV3CkgIJJ3vXxQ5duQMpQD7dUWkxsgArjYkaPiLMFnHbhJUuEw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 08 Jan 2020 14:17:41 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVxi5dBoxiBer0fkCxjchssmHpGw==
  • Thread-topic: [UNIKRAFT/NEWLIB PATCH 1/1] 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 <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 Makefile.uk                      |  1 +
 musl-imported/src/math/sincosl.c | 10 ++++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 musl-imported/src/math/sincosl.c

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..003f6e4
--- /dev/null
+++ b/musl-imported/src/math/sincosl.c
@@ -0,0 +1,10 @@
+#define _GNU_SOURCE
+
+void sincosl(long double x, long double *sin, long double *cos)
+{
+       double sind, cosd;
+
+       sincos(x, &sind, &cosd);
+       *sin = sind;
+       *cos = cosd;
+}
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.