diff options
Diffstat (limited to 'meta/packages/uclibc/uclibc-0.9.30.1/uclibc-c99-ldbl-math.patch')
-rw-r--r-- | meta/packages/uclibc/uclibc-0.9.30.1/uclibc-c99-ldbl-math.patch | 474 |
1 files changed, 474 insertions, 0 deletions
diff --git a/meta/packages/uclibc/uclibc-0.9.30.1/uclibc-c99-ldbl-math.patch b/meta/packages/uclibc/uclibc-0.9.30.1/uclibc-c99-ldbl-math.patch new file mode 100644 index 0000000000..f3718431ea --- /dev/null +++ b/meta/packages/uclibc/uclibc-0.9.30.1/uclibc-c99-ldbl-math.patch | |||
@@ -0,0 +1,474 @@ | |||
1 | Index: uClibc-0.9.30.1/libm/ldouble_wrappers.c | ||
2 | =================================================================== | ||
3 | --- uClibc-0.9.30.1/libm/ldouble_wrappers.c (revision 25552) | ||
4 | +++ uClibc-0.9.30.1/libm/ldouble_wrappers.c (working copy) | ||
5 | @@ -13,6 +13,16 @@ | ||
6 | #include "math.h" | ||
7 | #include <complex.h> | ||
8 | |||
9 | +#if defined __NO_LONG_DOUBLE_MATH | ||
10 | +# define int_WRAPPER_C99(func) /* not needed */ | ||
11 | +# else | ||
12 | +# define int_WRAPPER_C99(func) \ | ||
13 | +int func##l(long double x) \ | ||
14 | +{ \ | ||
15 | + return func((double) x); \ | ||
16 | +} \ | ||
17 | +libm_hidden_def(func##l) | ||
18 | +#endif | ||
19 | |||
20 | /* Implement the following, as defined by SuSv3 */ | ||
21 | #if 0 | ||
22 | @@ -543,46 +553,28 @@ long double truncl (long double x) | ||
23 | #endif | ||
24 | |||
25 | |||
26 | -#ifdef __DO_C99_MATH__ | ||
27 | +#if defined __DO_C99_MATH__ | ||
28 | |||
29 | #ifdef L_fpclassifyl | ||
30 | -int __fpclassifyl (long double x) | ||
31 | -{ | ||
32 | - return __fpclassify ( (double) x ); | ||
33 | -} | ||
34 | -libm_hidden_def(__fpclassifyl) | ||
35 | +int_WRAPPER_C99(__fpclassify) | ||
36 | #endif | ||
37 | |||
38 | #ifdef L_finitel | ||
39 | -int __finitel (long double x) | ||
40 | -{ | ||
41 | - return __finite ( (double)x ); | ||
42 | -} | ||
43 | -libm_hidden_def(__finitel) | ||
44 | +int_WRAPPER_C99(__finite) | ||
45 | #endif | ||
46 | |||
47 | #ifdef L_signbitl | ||
48 | -int __signbitl (long double x) | ||
49 | -{ | ||
50 | - return __signbitl ( (double)x ); | ||
51 | -} | ||
52 | -libm_hidden_def(__signbitl) | ||
53 | +int_WRAPPER_C99(__signbit) | ||
54 | #endif | ||
55 | |||
56 | #ifdef L_isnanl | ||
57 | -int __isnanl (long double x) | ||
58 | -{ | ||
59 | - return __isnan ( (double)x ); | ||
60 | -} | ||
61 | -libm_hidden_def(__isnanl) | ||
62 | +int_WRAPPER_C99(__isnan) | ||
63 | #endif | ||
64 | |||
65 | #ifdef L_isinfl | ||
66 | -int __isinfl (long double x) | ||
67 | -{ | ||
68 | - return __isinf ( (double)x ); | ||
69 | -} | ||
70 | -libm_hidden_def(__isinfl) | ||
71 | +int_WRAPPER_C99(__isinf) | ||
72 | #endif | ||
73 | |||
74 | -#endif | ||
75 | +#endif /* DO_C99_MATH */ | ||
76 | + | ||
77 | +#undef int_WRAPPER_C99 | ||
78 | Index: uClibc-0.9.30.1/libm/nan.c | ||
79 | =================================================================== | ||
80 | --- uClibc-0.9.30.1/libm/nan.c (revision 25552) | ||
81 | +++ uClibc-0.9.30.1/libm/nan.c (working copy) | ||
82 | @@ -45,7 +45,7 @@ float nanf (const char *tagp) | ||
83 | } | ||
84 | libm_hidden_def(nanf) | ||
85 | |||
86 | -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
87 | +#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH | ||
88 | libm_hidden_proto(nanl) | ||
89 | long double nanl (const char *tagp) | ||
90 | { | ||
91 | Index: uClibc-0.9.30.1/include/math.h | ||
92 | =================================================================== | ||
93 | --- uClibc-0.9.30.1/include/math.h (revision 25552) | ||
94 | +++ uClibc-0.9.30.1/include/math.h (working copy) | ||
95 | @@ -118,7 +118,7 @@ __BEGIN_DECLS | ||
96 | # undef __MATH_PRECNAME | ||
97 | |||
98 | # if (__STDC__ - 0 || __GNUC__ - 0) \ | ||
99 | - && (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT) | ||
100 | + && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT) | ||
101 | # ifdef __LDBL_COMPAT | ||
102 | |||
103 | # ifdef __USE_ISOC99 | ||
104 | @@ -230,7 +230,7 @@ enum | ||
105 | }; | ||
106 | |||
107 | /* Return number of classification appropriate for X. */ | ||
108 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
109 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
110 | # define fpclassify(x) \ | ||
111 | (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x)) | ||
112 | # else | ||
113 | @@ -242,7 +242,7 @@ enum | ||
114 | # endif | ||
115 | |||
116 | /* Return nonzero value if sign of X is negative. */ | ||
117 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
118 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
119 | # define signbit(x) \ | ||
120 | (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x)) | ||
121 | # else | ||
122 | @@ -254,7 +254,7 @@ enum | ||
123 | # endif | ||
124 | |||
125 | /* Return nonzero value if X is not +-Inf or NaN. */ | ||
126 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
127 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
128 | # define isfinite(x) \ | ||
129 | (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x)) | ||
130 | # else | ||
131 | @@ -270,7 +270,7 @@ enum | ||
132 | |||
133 | /* Return nonzero value if X is a NaN. We could use `fpclassify' but | ||
134 | we already have this functions `__isnan' and it is faster. */ | ||
135 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
136 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
137 | # define isnan(x) \ | ||
138 | (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x)) | ||
139 | # else | ||
140 | @@ -282,7 +282,7 @@ enum | ||
141 | # endif | ||
142 | |||
143 | /* Return nonzero value is X is positive or negative infinity. */ | ||
144 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
145 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
146 | # define isinf(x) \ | ||
147 | (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x)) | ||
148 | # else | ||
149 | Index: uClibc-0.9.30.1/include/tgmath.h | ||
150 | =================================================================== | ||
151 | --- uClibc-0.9.30.1/include/tgmath.h (revision 25552) | ||
152 | +++ uClibc-0.9.30.1/include/tgmath.h (working copy) | ||
153 | @@ -36,7 +36,7 @@ | ||
154 | |||
155 | #if __GNUC_PREREQ (2, 7) | ||
156 | |||
157 | -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
158 | +# ifdef __NO_LONG_DOUBLE_MATH | ||
159 | # define __tgml(fct) fct | ||
160 | # else | ||
161 | # define __tgml(fct) fct ## l | ||
162 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h | ||
163 | =================================================================== | ||
164 | --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (revision 25552) | ||
165 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (working copy) | ||
166 | @@ -7,13 +7,13 @@ | ||
167 | # define __WORDSIZE 32 | ||
168 | #endif | ||
169 | |||
170 | -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL | ||
171 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL | ||
172 | |||
173 | /* Signal the glibc ABI didn't used to have a `long double'. | ||
174 | The changes all the `long double' function variants to be redirects | ||
175 | to the double functions. */ | ||
176 | # define __LONG_DOUBLE_MATH_OPTIONAL 1 | ||
177 | # ifndef __LONG_DOUBLE_128__ | ||
178 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
179 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
180 | # endif | ||
181 | #endif | ||
182 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h | ||
183 | =================================================================== | ||
184 | --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (revision 25552) | ||
185 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (working copy) | ||
186 | @@ -65,11 +65,13 @@ typedef double double_t; | ||
187 | |||
188 | #endif /* ISO C99 */ | ||
189 | |||
190 | -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
191 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
192 | #include <bits/wordsize.h> | ||
193 | /* Signal that we do not really have a `long double'. The disables the | ||
194 | declaration of all the `long double' function variants. */ | ||
195 | # if __WORDSIZE == 32 | ||
196 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
197 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
198 | +# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
199 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
200 | # endif /* __WORDSIZE == 32 */ | ||
201 | -#endif /* __UCLIBC_HAS_LONG_DOUBLE_MATH__ */ | ||
202 | +#endif /* __NO_LONG_DOUBLE_MATH */ | ||
203 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h | ||
204 | =================================================================== | ||
205 | --- uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (revision 25552) | ||
206 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (working copy) | ||
207 | @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp | ||
208 | # define FP_ILOGBNAN (2147483647) | ||
209 | |||
210 | #endif /* ISO C99 */ | ||
211 | + | ||
212 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
213 | +/* Signal that we do not really have a `long double'. This disables the | ||
214 | + declaration of all the `long double' function variants. */ | ||
215 | +/* XXX The FPA does support this but the patterns in GCC are currently | ||
216 | + turned off. */ | ||
217 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
218 | +#endif | ||
219 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h | ||
220 | =================================================================== | ||
221 | --- uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (revision 25552) | ||
222 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (working copy) | ||
223 | @@ -36,3 +36,7 @@ typedef long double double_t; /* `double | ||
224 | # define FP_ILOGBNAN (2147483647) | ||
225 | |||
226 | #endif /* ISO C99 */ | ||
227 | + | ||
228 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
229 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
230 | +#endif | ||
231 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h | ||
232 | =================================================================== | ||
233 | --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (revision 25552) | ||
234 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (working copy) | ||
235 | @@ -18,13 +18,13 @@ | ||
236 | |||
237 | #define __WORDSIZE 64 | ||
238 | |||
239 | -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL | ||
240 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL | ||
241 | |||
242 | /* Signal that we didn't used to have a `long double'. The changes all | ||
243 | the `long double' function variants to be redirects to the double | ||
244 | functions. */ | ||
245 | # define __LONG_DOUBLE_MATH_OPTIONAL 1 | ||
246 | # ifndef __LONG_DOUBLE_128__ | ||
247 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
248 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
249 | # endif | ||
250 | #endif | ||
251 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h | ||
252 | =================================================================== | ||
253 | --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (revision 25552) | ||
254 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (working copy) | ||
255 | @@ -78,3 +78,7 @@ typedef double double_t; | ||
256 | |||
257 | # endif /* GNUC before 3.4 */ | ||
258 | #endif /* COMPLEX_H */ | ||
259 | + | ||
260 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
261 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
262 | +#endif | ||
263 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h | ||
264 | =================================================================== | ||
265 | --- uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (revision 25552) | ||
266 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (working copy) | ||
267 | @@ -35,3 +35,9 @@ typedef double double_t; /* `double' exp | ||
268 | # define FP_ILOGBNAN 2147483647 | ||
269 | |||
270 | #endif /* ISO C99 */ | ||
271 | + | ||
272 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
273 | +/* Signal that we do not really have a `long double'. The disables the | ||
274 | + declaration of all the `long double' function variants. */ | ||
275 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
276 | +#endif | ||
277 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h | ||
278 | =================================================================== | ||
279 | --- uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (revision 25552) | ||
280 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (working copy) | ||
281 | @@ -44,3 +44,7 @@ typedef long double double_t; /* `double | ||
282 | # define FP_ILOGBNAN (-2147483647 - 1) | ||
283 | |||
284 | #endif /* ISO C99 */ | ||
285 | + | ||
286 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
287 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
288 | +#endif | ||
289 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h | ||
290 | =================================================================== | ||
291 | --- uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (revision 25552) | ||
292 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (working copy) | ||
293 | @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp | ||
294 | # define FP_ILOGBNAN (2147483647) | ||
295 | |||
296 | #endif /* ISO C99 */ | ||
297 | + | ||
298 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
299 | +/* Signal that we do not really have a `long double'. This disables the | ||
300 | + declaration of all the `long double' function variants. */ | ||
301 | +/* XXX The FPA does support this but the patterns in GCC are currently | ||
302 | + turned off. */ | ||
303 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
304 | +#endif | ||
305 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h | ||
306 | =================================================================== | ||
307 | --- uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (revision 25552) | ||
308 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (working copy) | ||
309 | @@ -46,3 +46,7 @@ typedef long double double_t; /* `double | ||
310 | # define FP_ILOGBNAN (-2147483647 - 1) | ||
311 | |||
312 | #endif /* ISO C99 */ | ||
313 | + | ||
314 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
315 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
316 | +#endif | ||
317 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h | ||
318 | =================================================================== | ||
319 | --- uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (revision 25552) | ||
320 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (working copy) | ||
321 | @@ -36,8 +36,8 @@ typedef double double_t; /* `double' exp | ||
322 | |||
323 | #endif /* ISO C99 */ | ||
324 | |||
325 | -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
326 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
327 | /* Signal that we do not really have a `long double'. The disables the | ||
328 | declaration of all the `long double' function variants. */ | ||
329 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
330 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
331 | #endif | ||
332 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h | ||
333 | =================================================================== | ||
334 | --- uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (revision 25552) | ||
335 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (working copy) | ||
336 | @@ -35,3 +35,7 @@ typedef double double_t; /* `double' exp | ||
337 | # define FP_ILOGBNAN 2147483647 | ||
338 | |||
339 | #endif /* ISO C99 */ | ||
340 | + | ||
341 | +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
342 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
343 | +#endif | ||
344 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h | ||
345 | =================================================================== | ||
346 | --- uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (revision 25552) | ||
347 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (working copy) | ||
348 | @@ -39,8 +39,10 @@ typedef double double_t; /* `double' exp | ||
349 | |||
350 | #endif /* ISO C99 */ | ||
351 | |||
352 | -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && _MIPS_SIM == _ABIO32 | ||
353 | +#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 | ||
354 | /* Signal that we do not really have a `long double'. This disables the | ||
355 | declaration of all the `long double' function variants. */ | ||
356 | -# error defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ and _MIPS_SIM == _ABIO32 | ||
357 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
358 | +#elif !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
359 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
360 | #endif | ||
361 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h | ||
362 | =================================================================== | ||
363 | --- uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (revision 25552) | ||
364 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (working copy) | ||
365 | @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp | ||
366 | # define FP_ILOGBNAN (2147483647) | ||
367 | |||
368 | #endif /* ISO C99 */ | ||
369 | + | ||
370 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
371 | +/* Signal that we do not really have a `long double'. This disables the | ||
372 | + declaration of all the `long double' function variants. */ | ||
373 | +/* XXX The FPA does support this but the patterns in GCC are currently | ||
374 | + turned off. */ | ||
375 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
376 | +#endif | ||
377 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h | ||
378 | =================================================================== | ||
379 | --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (revision 25552) | ||
380 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (working copy) | ||
381 | @@ -6,7 +6,7 @@ | ||
382 | # define __WORDSIZE 32 | ||
383 | #endif | ||
384 | |||
385 | -#if 0 /* uClibc: done in mathdefs.h: defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL*/ | ||
386 | +#if 0 /* uClibc: done in mathdefs.h: !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL*/ | ||
387 | |||
388 | # if __WORDSIZE == 32 | ||
389 | /* Signal that in 32bit ABI we didn't used to have a `long double'. | ||
390 | @@ -14,7 +14,7 @@ | ||
391 | to the double functions. */ | ||
392 | # define __LONG_DOUBLE_MATH_OPTIONAL 1 | ||
393 | # ifndef __LONG_DOUBLE_128__ | ||
394 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
395 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
396 | # endif | ||
397 | # endif | ||
398 | #endif | ||
399 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h | ||
400 | =================================================================== | ||
401 | --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (revision 25552) | ||
402 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (working copy) | ||
403 | @@ -57,13 +57,15 @@ typedef double double_t; | ||
404 | |||
405 | #endif /* ISO C99 */ | ||
406 | |||
407 | -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
408 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
409 | |||
410 | # if __WORDSIZE == 32 | ||
411 | /* Signal that in 32bit ABI we do not really have a `long double'. | ||
412 | The disables the declaration of all the `long double' function | ||
413 | variants. */ | ||
414 | -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
415 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
416 | +# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
417 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
418 | # endif | ||
419 | |||
420 | #endif | ||
421 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h | ||
422 | =================================================================== | ||
423 | --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (revision 25552) | ||
424 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (working copy) | ||
425 | @@ -37,7 +37,7 @@ | ||
426 | |||
427 | # if __WORDSIZE == 32 | ||
428 | |||
429 | -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
430 | +# ifndef __NO_LONG_DOUBLE_MATH | ||
431 | |||
432 | # define __unordered_cmp(x, y) \ | ||
433 | (__extension__ \ | ||
434 | @@ -157,7 +157,7 @@ __NTH (__signbit (double __x)) | ||
435 | return __u.__i[0] < 0; | ||
436 | } | ||
437 | |||
438 | -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
439 | +# ifndef __NO_LONG_DOUBLE_MATH | ||
440 | __MATH_INLINE int | ||
441 | __NTH (__signbitl (long double __x)) | ||
442 | { | ||
443 | @@ -219,7 +219,7 @@ __NTH (sqrtl (long double __x)) | ||
444 | _Qp_sqrt (&__r, &__x); | ||
445 | return __r; | ||
446 | } | ||
447 | -# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
448 | +# elif !defined __NO_LONG_DOUBLE_MATH | ||
449 | __MATH_INLINE long double | ||
450 | sqrtl (long double __x) __THROW | ||
451 | { | ||
452 | @@ -257,7 +257,7 @@ __ieee754_sqrtl (long double __x) | ||
453 | _Qp_sqrt(&__r, &__x); | ||
454 | return __r; | ||
455 | } | ||
456 | -# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ | ||
457 | +# elif !defined __NO_LONG_DOUBLE_MATH | ||
458 | __MATH_INLINE long double | ||
459 | __ieee754_sqrtl (long double __x) | ||
460 | { | ||
461 | Index: uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h | ||
462 | =================================================================== | ||
463 | --- uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (revision 25552) | ||
464 | +++ uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (working copy) | ||
465 | @@ -61,3 +61,9 @@ typedef double double_t; | ||
466 | # define FP_ILOGBNAN 0x7fffffff | ||
467 | |||
468 | #endif /* ISO C99 */ | ||
469 | + | ||
470 | +#ifndef __NO_LONG_DOUBLE_MATH | ||
471 | +/* Signal that we do not really have a `long double'. The disables the | ||
472 | + declaration of all the `long double' function variants. */ | ||
473 | +# define __NO_LONG_DOUBLE_MATH 1 | ||
474 | +#endif | ||