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)
9 +#if defined __NO_LONG_DOUBLE_MATH
10 +# define int_WRAPPER_C99(func) /* not needed */
12 +# define int_WRAPPER_C99(func) \
13 +int func##l(long double x) \
15 + return func((double) x); \
17 +libm_hidden_def(func##l)
20 /* Implement the following, as defined by SuSv3 */
22 @@ -543,46 +553,28 @@ long double truncl (long double x)
26 -#ifdef __DO_C99_MATH__
27 +#if defined __DO_C99_MATH__
30 -int __fpclassifyl (long double x)
32 - return __fpclassify ( (double) x );
34 -libm_hidden_def(__fpclassifyl)
35 +int_WRAPPER_C99(__fpclassify)
39 -int __finitel (long double x)
41 - return __finite ( (double)x );
43 -libm_hidden_def(__finitel)
44 +int_WRAPPER_C99(__finite)
48 -int __signbitl (long double x)
50 - return __signbitl ( (double)x );
52 -libm_hidden_def(__signbitl)
53 +int_WRAPPER_C99(__signbit)
57 -int __isnanl (long double x)
59 - return __isnan ( (double)x );
61 -libm_hidden_def(__isnanl)
62 +int_WRAPPER_C99(__isnan)
66 -int __isinfl (long double x)
68 - return __isinf ( (double)x );
70 -libm_hidden_def(__isinfl)
71 +int_WRAPPER_C99(__isinf)
75 +#endif /* DO_C99_MATH */
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)
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)
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
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
104 @@ -230,7 +230,7 @@ enum
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))
113 @@ -242,7 +242,7 @@ enum
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))
122 @@ -254,7 +254,7 @@ enum
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))
131 @@ -270,7 +270,7 @@ enum
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
138 (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
140 @@ -282,7 +282,7 @@ enum
143 /* Return nonzero value is X is positive or negative infinity. */
144 -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
145 +# ifdef __NO_LONG_DOUBLE_MATH
147 (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
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)
155 #if __GNUC_PREREQ (2, 7)
157 -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
158 +# ifdef __NO_LONG_DOUBLE_MATH
159 # define __tgml(fct) fct
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)
167 # define __WORDSIZE 32
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
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
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;
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)
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
217 +# define __NO_LONG_DOUBLE_MATH 1
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)
228 +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
229 +# define __NO_LONG_DOUBLE_MATH 1
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)
237 #define __WORDSIZE 64
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
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
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
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;
257 # endif /* GNUC before 3.4 */
258 #endif /* COMPLEX_H */
260 +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
261 +# define __NO_LONG_DOUBLE_MATH 1
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
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
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)
286 +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
287 +# define __NO_LONG_DOUBLE_MATH 1
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)
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
303 +# define __NO_LONG_DOUBLE_MATH 1
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)
314 +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
315 +# define __NO_LONG_DOUBLE_MATH 1
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
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
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
341 +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
342 +# define __NO_LONG_DOUBLE_MATH 1
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
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
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)
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
375 +# define __NO_LONG_DOUBLE_MATH 1
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)
382 # define __WORDSIZE 32
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*/
388 # if __WORDSIZE == 32
389 /* Signal that in 32bit ABI we didn't used to have a `long double'.
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
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;
407 -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
408 +#ifndef __NO_LONG_DOUBLE_MATH
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
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
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)
427 # if __WORDSIZE == 32
429 -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
430 +# ifndef __NO_LONG_DOUBLE_MATH
432 # define __unordered_cmp(x, y) \
434 @@ -157,7 +157,7 @@ __NTH (__signbit (double __x))
435 return __u.__i[0] < 0;
438 -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
439 +# ifndef __NO_LONG_DOUBLE_MATH
441 __NTH (__signbitl (long double __x))
443 @@ -219,7 +219,7 @@ __NTH (sqrtl (long double __x))
444 _Qp_sqrt (&__r, &__x);
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
452 @@ -257,7 +257,7 @@ __ieee754_sqrtl (long double __x)
453 _Qp_sqrt(&__r, &__x);
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)
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
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