blob: 0c482370b8ba59a432836f701b3bfd0a0eff1194 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
Index: qemu/bsd/i386/s_ldexpl.c
@@ -2,6 +2,30 @@
#include <errno.h>
#include <sysdep.h>
+/* 4.x doesnt have isfinite */
+#ifndef isfinite
+#define isfinite __isfinitel
+
+union IEEEl2bits {
+ long double e;
+ struct {
+ unsigned int manl :32;
+ unsigned int manh :32;
+ unsigned int exp :15;
+ unsigned int sign :1;
+ unsigned int junk :16;
+ } bits;
+};
+
+static int __isfinitel(long double x)
+{
+ union IEEEl2bits u;
+
+ u.e = x;
+ return (u.bits.exp != 32767);
+}
+#endif
+
long double __ldexpl(long double x, int expn)
{
long double res;
Index: qemu/bsd/i386/s_round.c
@@ -29,6 +29,11 @@
#include <math.h>
+/* 4.x doesnt have isfinite */
+#ifndef isfinite
+#define isfinite(x) (!isnan(x) && !isinf(x))
+#endif
+
double
round(double x)
{
|