projects
/
oweals
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
uclibc: fix the new libpthread implementation on arm
[oweals/openwrt.git]
/
toolchain
/
uClibc
/
patches
/
210-trunc.patch
1
--- a/libm/s_floor.c
2
+++ b/libm/s_floor.c
3
@@ -81,3 +81,18 @@ libm_hidden_proto(floor)
4
return x;
5
}
6
libm_hidden_def(floor)
7
+
8
+
9
+libm_hidden_proto(trunc)
10
+double
11
+trunc(double x)
12
+{
13
+ if (!finite (x))
14
+ return x;
15
+
16
+ if (x < 0.0)
17
+ return - floor (-x);
18
+ else
19
+ return floor (x);
20
+}
21
+libm_hidden_def(trunc)