summaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r--main/libc0.9.32/APKBUILD6
-rw-r--r--main/libc0.9.32/libm-cabsf.patch37
-rw-r--r--main/libc0.9.32/libm-cexp.patch101
3 files changed, 143 insertions, 1 deletions
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index 4b6536332..eded79b32 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -4,7 +4,7 @@ pkgname=libc$_abiver
_gitver=
pkgver=0.9.32
_ver=${pkgver/_/-}
-pkgrel=5
+pkgrel=6
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -32,6 +32,8 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2
0001-malloc-standard-synchronize-on-fork.patch
0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch
0001-getaddrinfo-allow-numeric-service-without-any-hints.patch
+ libm-cabsf.patch
+ libm-cexp.patch
uclibc-ubacktrace-asneeded-fix.patch
uclibc-librt-asneeded-fix.patch
uclibc-epoll_pwait-hack.patch
@@ -142,6 +144,8 @@ b4fb68ad3d0e8331b1b40c30eb21dfdc 0002-stdlib-fix-arc4random-return-type-to-u_in
30f27fe51fdc4d121166ad2af18dfb8d 0001-malloc-standard-synchronize-on-fork.patch
2548d9f470c9a5b2c117ec3d6f35c105 0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch
9e1ffc8dae55f4489c770f284734804f 0001-getaddrinfo-allow-numeric-service-without-any-hints.patch
+40e9c7f017cc81ee5b19ead000b9b6b7 libm-cabsf.patch
+42416385763f7cd50775ed9bfaf2d59e libm-cexp.patch
7c47e9cb284b0da8df6ed2096b2c9c66 uclibc-ubacktrace-asneeded-fix.patch
e5caf13c43ee8d48f22eded21b857d81 uclibc-librt-asneeded-fix.patch
0ed588014227935fbb83b207282f3c15 uclibc-epoll_pwait-hack.patch
diff --git a/main/libc0.9.32/libm-cabsf.patch b/main/libc0.9.32/libm-cabsf.patch
new file mode 100644
index 000000000..5ffa11455
--- /dev/null
+++ b/main/libc0.9.32/libm-cabsf.patch
@@ -0,0 +1,37 @@
+From 0c71b7626655c1023c5e10ebb3b1a294f8e41353 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Tue, 1 Nov 2011 18:55:25 -0500
+Subject: [PATCH 2/2] libm: add cabsf() and cabsl() functions.
+
+Signed-off-by: William Pitcock <nenolod@dereferenced.org>
+---
+ libm/w_cabs.c | 16 ++++++++++++++++
+ 1 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/libm/w_cabs.c b/libm/w_cabs.c
+index 4044f4b..b259248 100644
+--- a/libm/w_cabs.c
++++ b/libm/w_cabs.c
+@@ -13,3 +13,19 @@ double cabs(double _Complex z)
+ return hypot(__real__ z, __imag__ z);
+ }
+ libm_hidden_def(cabs)
++
++libm_hidden_proto(cabsf)
++float cabsf(float _Complex z)
++{
++ return (float) hypot(__real__ z, __imag__ z);
++}
++libm_hidden_def(cabsf)
++
++#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH
++libm_hidden_proto(cabsl)
++long double cabsl(long double _Complex z)
++{
++ return hypotl(__real__ z, __imag__ z);
++}
++libm_hidden_def(cabsl)
++#endif
+--
+1.7.7.1
+
diff --git a/main/libc0.9.32/libm-cexp.patch b/main/libc0.9.32/libm-cexp.patch
new file mode 100644
index 000000000..82f914fa9
--- /dev/null
+++ b/main/libc0.9.32/libm-cexp.patch
@@ -0,0 +1,101 @@
+From 8733cd43293bfa04b4334db7873c4de613f5cf75 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Tue, 1 Nov 2011 18:41:30 -0500
+Subject: [PATCH 1/2] libm: implement generic cexp(), cexpf() and cexpl().
+
+The cexp*() family of functions is defined by the C99 math standard as
+implementing exponential functions for complex types.
+
+Signed-off-by: William Pitcock <nenolod@dereferenced.org>
+---
+ libm/Makefile.in | 3 +-
+ libm/cexp.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 65 insertions(+), 1 deletions(-)
+ create mode 100644 libm/cexp.c
+
+diff --git a/libm/Makefile.in b/libm/Makefile.in
+index f0aaa2a..af949e8 100644
+--- a/libm/Makefile.in
++++ b/libm/Makefile.in
+@@ -72,7 +72,8 @@ libm_CSRC := \
+ s_fpclassify.c s_fpclassifyf.c s_signbit.c s_signbitf.c \
+ s_isnan.c s_isnanf.c s_isinf.c s_isinff.c s_finitef.c \
+ s_fdim.c s_fma.c s_fmax.c s_fmin.c \
+- s_remquo.c w_exp2.c
++ s_remquo.c w_exp2.c \
++ cexp.c
+
+ # Not implemented [yet?], see comment in float_wrappers.c:
+ # fdimf.o fmaf.o fmaxf.o fminf.o
+diff --git a/libm/cexp.c b/libm/cexp.c
+new file mode 100644
+index 0000000..87512b7
+--- /dev/null
++++ b/libm/cexp.c
+@@ -0,0 +1,63 @@
++/*
++ * Copyright (c) 2011 William Pitcock <nenolod@dereferenced.org>
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
++ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include <features.h>
++#include <math.h>
++#include <complex.h>
++
++__complex__ double cexp(__complex__ double z)
++{
++ __complex__ double ret;
++ double r_exponent = exp(__real__ z);
++
++ __real__ ret = r_exponent * cos(__imag__ z);
++ __imag__ ret = r_exponent * sin(__imag__ z);
++
++ return ret;
++}
++libm_hidden_def(cexp)
++
++libm_hidden_proto(cexpf)
++__complex__ float cexpf(__complex__ float z)
++{
++ __complex__ float ret;
++ double r_exponent = exp(__real__ z);
++
++ __real__ ret = r_exponent * cosf(__imag__ z);
++ __imag__ ret = r_exponent * sinf(__imag__ z);
++
++ return ret;
++}
++libm_hidden_def(cexpf)
++
++#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH
++libm_hidden_proto(cexpl)
++__complex__ long double cexpl(__complex__ long double z)
++{
++ __complex__ long double ret;
++ long double r_exponent = expl(__real__ z);
++
++ __real__ ret = r_exponent * cosl(__imag__ z);
++ __imag__ ret = r_exponent * sinl(__imag__ z);
++
++ return ret;
++}
++libm_hidden_def(cexpl)
++#endif
+--
+1.7.7.1
+