aboutsummaryrefslogtreecommitdiffstats
path: root/community/openlibm/powerpc_fixes.patch
blob: c9eb9c99cfa4b8f2b002392bf8ee83a7fc95882c (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
commit f81e5b71ce78f33250347914dacc75c8463bf102
Author: Breno Leitao <breno.leitao@gmail.com>
Date:   Wed Mar 29 15:22:38 2017 -0300

    Fix the build on powerpc platform

    openlibm is using some old definitions on the powerpc files.
    Adjusting to use a modern set of types.

    Signed-off-by: Breno Leitao <breno.leitao@gmail.com>

--- a/include/openlibm_fenv_powerpc.h	2017-04-03 18:39:03.776367216 +0000
+++ b/include/openlibm_fenv_powerpc.h	2017-04-03 18:40:09.324368390 +0000
@@ -30,13 +30,14 @@
 #define	_FENV_H_
 
 #include <sys/types.h>
+#include <stdint.h>
 
 #ifndef	__fenv_static
 #define	__fenv_static	static
 #endif
 
-typedef	__uint32_t	fenv_t;
-typedef	__uint32_t	fexcept_t;
+typedef	uint32_t	fenv_t;
+typedef	uint32_t	fexcept_t;
 
 /* Exception flags */
 #define	FE_INEXACT	0x02000000
@@ -75,7 +76,6 @@ typedef	__uint32_t	fexcept_t;
 #define	_ROUND_MASK	(FE_TONEAREST | FE_DOWNWARD | \
 			 FE_UPWARD | FE_TOWARDZERO)
 
-__BEGIN_DECLS
 
 /* Default floating-point environment */
 extern const fenv_t	__fe_dfl_env;
@@ -99,9 +99,9 @@ union __fpscr {
 	struct {
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 		fenv_t __reg;
-		__uint32_t __junk;
+		uint32_t __junk;
 #else
-		__uint32_t __junk;
+		uint32_t __junk;
 		fenv_t __reg;
 #endif
 	} __bits;
@@ -274,6 +274,5 @@ fegetexcept(void)
 
 #endif /* __BSD_VISIBLE */
 
-__END_DECLS
 
 #endif	/* !_FENV_H_ */