The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0069-Add-missing-C99-float-ld-wrappers.patch
1 From 6c4538905e65ceb203f59aaa9a61728e81c6bc0a Mon Sep 17 00:00:00 2001
2 From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
3 Date: Wed, 18 Mar 2015 21:32:22 +0000
4 Subject: libm: Add missing C99 float/ld wrappers
5
6 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
7
8 Status: upstream [uClibc]
9 http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a
10
11 Removed patch for ./TODO.
12 Needed to avoid run-time errors with mesa3d which depends on fminf
13
14 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
15 ---
16 diff --git a/include/complex.h b/include/complex.h
17 index 91efc0d..ed7e502 100644
18 --- a/include/complex.h
19 +++ b/include/complex.h
20 @@ -79,6 +79,7 @@ __BEGIN_DECLS
21  #endif
22  #include <bits/cmathcalls.h>
23  #undef _Mdouble_
24 +#undef _Mfloat_
25  #undef __MATH_PRECNAME
26  
27  /* And the long double versions.  It is non-critical to define them
28 @@ -97,6 +98,7 @@ __BEGIN_DECLS
29  # include <bits/cmathcalls.h>
30  #endif
31  #undef _Mdouble_
32 +#undef _Mlong_double_
33  #undef __MATH_PRECNAME
34  #undef __MATHDECL_1
35  #undef __MATHDECL
36 diff --git a/include/math.h b/include/math.h
37 index ecb9aa6..1b54c9e 100644
38 --- a/include/math.h
39 +++ b/include/math.h
40 @@ -129,6 +129,7 @@ __BEGIN_DECLS
41  # undef        _Mdouble_
42  # undef _Mdouble_BEGIN_NAMESPACE
43  # undef _Mdouble_END_NAMESPACE
44 +# undef _Mfloat_
45  # undef        __MATH_PRECNAME
46  # undef __MATH_maybe_libm_hidden_proto
47  
48 @@ -176,6 +177,7 @@ extern long double __REDIRECT_NTH (nexttowardl, (long double __x, long double __
49  #  undef _Mdouble_
50  #  undef _Mdouble_BEGIN_NAMESPACE
51  #  undef _Mdouble_END_NAMESPACE
52 +#  undef _Mlong_double_
53  #  undef __MATH_PRECNAME
54  #  undef __MATH_maybe_libm_hidden_proto
55  
56 diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
57 index 84b793c..9bebb51 100644
58 --- a/libc/sysdeps/linux/common/bits/mathcalls.h
59 +++ b/libc/sysdeps/linux/common/bits/mathcalls.h
60 @@ -74,8 +74,22 @@ __MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x))
61  
62  /* Cosine of X.  */
63  __MATHCALLI (cos,, (_Mdouble_ __x))
64 +# if defined _LIBC && defined _Mlong_double_
65 +libm_hidden_proto(cosl)
66 +# endif
67 +# if defined _LIBC && defined _Mfloat_
68 +libm_hidden_proto(cosf)
69 +# endif
70 +
71  /* Sine of X.  */
72  __MATHCALLI (sin,, (_Mdouble_ __x))
73 +# if defined _LIBC && defined _Mlong_double_
74 +libm_hidden_proto(sinl)
75 +# endif
76 +# if defined _LIBC && defined _Mfloat_
77 +libm_hidden_proto(sinf)
78 +# endif
79 +
80  /* Tangent of X.  */
81  __MATHCALLI (tan,, (_Mdouble_ __x))
82  
83 @@ -111,6 +125,9 @@ __END_NAMESPACE_C99
84  _Mdouble_BEGIN_NAMESPACE
85  /* Exponential function of X.  */
86  __MATHCALLI (exp,, (_Mdouble_ __x))
87 +# if defined _LIBC && defined _Mlong_double_
88 +libm_hidden_proto(expl)
89 +# endif
90  
91  /* Break VALUE into a normalized fraction and an integral power of 2.  */
92  __MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent))
93 @@ -173,6 +190,9 @@ _Mdouble_END_NAMESPACE
94  __BEGIN_NAMESPACE_C99
95  /* Return `sqrt(X*X + Y*Y)'.  */
96  __MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y))
97 +# if defined _LIBC && defined _Mlong_double_
98 +libm_hidden_proto(hypotl)
99 +# endif
100  __END_NAMESPACE_C99
101  #endif
102  
103 @@ -298,6 +318,9 @@ __MATHCALLI (rint,, (_Mdouble_ __x))
104  
105  /* Return X + epsilon if X < Y, X - epsilon if X > Y.  */
106  __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__))
107 +# if defined _LIBC && defined _Mlong_double_
108 +libm_hidden_proto(nextafterl)
109 +# endif
110  # if defined __USE_ISOC99 && !defined __LDBL_COMPAT
111  __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__))
112  # endif
113 diff --git a/libm/Makefile.in b/libm/Makefile.in
114 index 7511706..d886cdb 100644
115 --- a/libm/Makefile.in
116 +++ b/libm/Makefile.in
117 @@ -75,9 +75,6 @@ libm_CSRC := \
118         s_remquo.c w_exp2.c \
119         cexp.c sincos.c
120  
121 -# Not implemented [yet?], see comment in float_wrappers.c:
122 -# fdimf.o fmaf.o fmaxf.o fminf.o
123 -# nearbyintf.o remquof.o scalblnf.o tgammaf.o
124  FL_MOBJ := \
125         acosf.o \
126         acoshf.o \
127 @@ -98,7 +95,11 @@ FL_MOBJ := \
128         expf.o \
129         expm1f.o \
130         fabsf.o \
131 +       fdimf.o \
132         floorf.o \
133 +       fmaf.o \
134 +       fmaxf.o \
135 +       fminf.o \
136         fmodf.o \
137         frexpf.o \
138         gammaf.o \
139 @@ -116,11 +117,14 @@ FL_MOBJ := \
140         lrintf.o \
141         lroundf.o \
142         modff.o \
143 +       nearbyintf.o \
144 +       nexttowardf.o \
145         powf.o \
146         remainderf.o \
147 +       remquof.o \
148         rintf.o \
149         roundf.o \
150 -       scalbf.o \
151 +       scalblnf.o \
152         scalbnf.o \
153         significandf.o \
154         sinf.o \
155 @@ -128,9 +132,24 @@ FL_MOBJ := \
156         sqrtf.o \
157         tanf.o \
158         tanhf.o \
159 +       tgammaf.o \
160         truncf.o \
161  
162 -# Not implemented [yet?]: nexttowardl.o
163 +ifeq ($(UCLIBC_SUSV3_LEGACY),y)
164 +FL_MOBJ += scalbf.o
165 +endif
166 +
167 +# Do not (yet?) implement the float variants of bessel functions
168 +ifeq (not-yet-implemented-$(DO_XSI_MATH),y)
169 +FL_MOBJ += \
170 +       j0f.o \
171 +       j1f.o \
172 +       jnf.o \
173 +       y0f.o \
174 +       y1f.o \
175 +       ynf.o
176 +endif
177 +
178  LD_MOBJ := \
179         __finitel.o \
180         __fpclassifyl.o \
181 @@ -180,6 +199,7 @@ LD_MOBJ := \
182         modfl.o \
183         nearbyintl.o \
184         nextafterl.o \
185 +       nexttowardl.o \
186         powl.o \
187         remainderl.o \
188         remquol.o \
189 @@ -196,6 +216,17 @@ LD_MOBJ := \
190         tgammal.o \
191         truncl.o \
192  
193 +# Do not (yet?) implement the long double variants of bessel functions
194 +ifeq (not-yet-implemented-$(DO_XSI_MATH),y)
195 +LD_MOBJ += \
196 +       j0l.o \
197 +       j1l.o \
198 +       jnl.o \
199 +       y0l.o \
200 +       y1l.o \
201 +       ynl.o
202 +endif
203 +
204  else
205  
206  # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
207 diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c
208 index 82b7963..105486e 100644
209 --- a/libm/float_wrappers.c
210 +++ b/libm/float_wrappers.c
211 @@ -38,19 +38,14 @@ long long func##f (float x) \
212         return func((double)x); \
213  }
214  
215 -
216 -/* For the time being, do _NOT_ implement these functions
217 - * that are defined by SuSv3 [because we don't need them
218 - * and nobody asked to include them] */
219 -#undef L_fdimf         /*float       fdimf(float, float);*/
220 -#undef L_fmaf          /*float       fmaf(float, float, float);*/
221 -#undef L_fmaxf         /*float       fmaxf(float, float);*/
222 -#undef L_fminf         /*float       fminf(float, float);*/
223 -#undef L_nearbyintf    /*float       nearbyintf(float);*/
224 -#undef L_nexttowardf   /*float       nexttowardf(float, long double);*/
225 -#undef L_remquof       /*float       remquof(float, float, int *);*/
226 -#undef L_scalblnf      /*float       scalblnf(float, long);*/
227 -#undef L_tgammaf       /*float       tgammaf(float);*/
228 +#ifndef __DO_XSI_MATH__
229 +# undef L_j0f  /* float j0f(float x); */
230 +# undef L_j1f  /* float j1f(float x); */
231 +# undef L_jnf  /* float jnf(int n, float x); */
232 +# undef L_y0f  /* float y0f(float x); */
233 +# undef L_y1f  /* float y1f(float x); */
234 +# undef L_ynf  /* float ynf(int n, float x); */
235 +#endif
236  
237  /* Implement the following, as defined by SuSv3 */
238  #if 0
239 @@ -155,6 +150,7 @@ float copysignf (float x, float y)
240  
241  #ifdef L_cosf
242  WRAPPER1(cos)
243 +libm_hidden_def(cosf)
244  #endif
245  
246  #ifdef L_coshf
247 @@ -242,6 +238,21 @@ float hypotf (float x, float y)
248  int_WRAPPER1(ilogb)
249  #endif
250  
251 +#ifdef L_j0f
252 +WRAPPER1(j0)
253 +#endif
254 +
255 +#ifdef L_j1f
256 +WRAPPER1(j1)
257 +#endif
258 +
259 +#ifdef L_jnf
260 +float jnf(int n, float x)
261 +{
262 +       return (float) jn(n, (double)x);
263 +}
264 +#endif
265 +
266  #ifdef L_ldexpf
267  float ldexpf (float x, int _exp)
268  {
269 @@ -306,7 +317,7 @@ WRAPPER1(nearbyint)
270  #ifdef L_nexttowardf
271  float nexttowardf (float x, long double y)
272  {
273 -       return (float) nexttoward( (double)x, (double)y );
274 +       return (float) nexttoward( (double)x, (long double)y );
275  }
276  #endif
277  
278 @@ -355,6 +366,7 @@ float scalbnf (float x, int _exp)
279  
280  #ifdef L_sinf
281  WRAPPER1(sin)
282 +libm_hidden_def(sinf)
283  #endif
284  
285  #ifdef L_sinhf
286 @@ -381,13 +393,6 @@ WRAPPER1(tgamma)
287  WRAPPER1(trunc)
288  #endif
289  
290 -#ifdef L_fmaf
291 -float fmaf (float x, float y, float z)
292 -{
293 -       return (float) fma( (double)x, (double)y, (double)z );
294 -}
295 -#endif
296 -
297  #if defined L_scalbf && defined __UCLIBC_SUSV3_LEGACY__
298  float scalbf (float x, float y)
299  {
300 @@ -402,3 +407,18 @@ WRAPPER1(gamma)
301  #ifdef L_significandf
302  WRAPPER1(significand)
303  #endif
304 +
305 +#ifdef L_y0f
306 +WRAPPER1(y0)
307 +#endif
308 +
309 +#ifdef L_y1f
310 +WRAPPER1(y1)
311 +#endif
312 +
313 +#ifdef L_ynf
314 +float ynf(int n, float x)
315 +{
316 +       return (float) yn(n, (double)x);
317 +}
318 +#endif
319 diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c
320 index 118a78f..b4215cb 100644
321 --- a/libm/ldouble_wrappers.c
322 +++ b/libm/ldouble_wrappers.c
323 @@ -42,6 +42,15 @@ long long func##l(long double x) \
324         return func((double) x); \
325  }
326  
327 +#ifndef __DO_XSI_MATH__
328 +# undef L_j0l  /* long double j0l(long double x); */
329 +# undef L_j1l  /* long double j1l(long double x); */
330 +# undef L_jnl  /* long double jnl(int n, long double x); */
331 +# undef L_y0l  /* long double y0l(long double x); */
332 +# undef L_y1l  /* long double y1l(long double x); */
333 +# undef L_ynl  /* long double ynl(int n, long double x); */
334 +#endif
335 +
336  /* Implement the following, as defined by SuSv3 */
337  #if 0
338  long double acoshl(long double);
339 @@ -156,6 +165,7 @@ WRAPPER1(cosh)
340  
341  #ifdef L_cosl
342  WRAPPER1(cos)
343 +libm_hidden_def(cosl)
344  #endif
345  
346  #ifdef L_erfcl
347 @@ -172,6 +182,7 @@ WRAPPER1(exp2)
348  
349  #ifdef L_expl
350  WRAPPER1(exp)
351 +libm_hidden_def(expl)
352  #endif
353  
354  #ifdef L_expm1l
355 @@ -222,12 +233,28 @@ WRAPPER1(gamma)
356  
357  #ifdef L_hypotl
358  WRAPPER2(hypot)
359 +libm_hidden_def(hypotl)
360  #endif
361  
362  #ifdef L_ilogbl
363  int_WRAPPER1(ilogb)
364  #endif
365  
366 +#ifdef L_j0l
367 +       WRAPPER1(j0)
368 +#endif
369 +
370 +#ifdef L_j1l
371 +       WRAPPER1(j1)
372 +#endif
373 +
374 +#ifdef L_jnl
375 +long double jnl(int n, long double x)
376 +{
377 +       return (long double) jn(n, (double)x);
378 +}
379 +#endif
380 +
381  #ifdef L_ldexpl
382  long double ldexpl (long double x, int ex)
383  {
384 @@ -291,12 +318,18 @@ WRAPPER1(nearbyint)
385  
386  #ifdef L_nextafterl
387  WRAPPER2(nextafter)
388 +libm_hidden_def(nextafterl)
389  #endif
390  
391 -/* Disabled in Makefile.in */
392 -#if 0 /* def L_nexttowardl */
393 -WRAPPER2(nexttoward)
394 -libm_hidden_def(nexttowardl)
395 +#ifdef L_nexttowardl
396 +# if 0 /* TODO */
397 +strong_alias(nextafterl, nexttowardl)
398 +# else
399 +long double nexttowardl(long double x, long double y)
400 +{
401 +       return nextafterl(x, y);
402 +}
403 +#endif
404  #endif
405  
406  #ifdef L_powl
407 @@ -344,6 +377,7 @@ WRAPPER1(sinh)
408  
409  #ifdef L_sinl
410  WRAPPER1(sin)
411 +libm_hidden_def(sinl)
412  #endif
413  
414  #ifdef L_sqrtl
415 @@ -370,6 +404,22 @@ WRAPPER1(trunc)
416  WRAPPER1(significand)
417  #endif
418  
419 +#ifdef L_y0l
420 +WRAPPER1(y0)
421 +#endif
422 +
423 +#ifdef L_y1l
424 +WRAPPER1(y1)
425 +#endif
426 +
427 +#ifdef L_ynl
428 +long double ynl(int n, long double x)
429 +{
430 +       return (long double) yn(n, (double)x);
431 +}
432 +#endif
433 +
434 +
435  #if defined __DO_C99_MATH__ && !defined __NO_LONG_DOUBLE_MATH
436  
437  # ifdef L___fpclassifyl
438 diff --git a/libm/s_fdim.c b/libm/s_fdim.c
439 index 6249219..6ed695c 100644
440 --- a/libm/s_fdim.c
441 +++ b/libm/s_fdim.c
442 @@ -6,13 +6,22 @@
443  
444  #include "math.h"
445  #include "math_private.h"
446 +#include <errno.h>
447  
448  double fdim(double x, double y)
449  {
450 -  int c = __fpclassify(x);
451 -  if (c == FP_NAN || c == FP_INFINITE)
452 -    return HUGE_VAL;
453 +  int cx = __fpclassify(x); /* need both NAN and INF */
454 +  int cy = __fpclassify(y); /* need both NAN and INF */
455 +  if (cx == FP_NAN || cy == NAN)
456 +    return x - y;
457  
458 -  return x > y ? x - y : 0.0;
459 +  if (x <= y)
460 +         return .0;
461 +
462 +  double z = x - y;
463 +  if (isinf(z) && cx != FP_INFINITE && cy != FP_INFINITE)
464 +         __set_errno(ERANGE);
465 +
466 +  return z;
467  }
468  libm_hidden_def(fdim)
469 diff --git a/libm/s_fmax.c b/libm/s_fmax.c
470 index 21dfaa9..5f29ad8 100644
471 --- a/libm/s_fmax.c
472 +++ b/libm/s_fmax.c
473 @@ -9,10 +9,10 @@
474  
475  double fmax(double x, double y)
476  {
477 -  if (__fpclassify(x) == FP_NAN)
478 -    return x;
479 -  if (__fpclassify(y) == FP_NAN)
480 +  if (isnan(x))
481      return y;
482 +  if (isnan(y))
483 +    return x;
484  
485    return x > y ? x : y;
486  }
487 diff --git a/libm/s_fmin.c b/libm/s_fmin.c
488 index 674d9a5..a549678 100644
489 --- a/libm/s_fmin.c
490 +++ b/libm/s_fmin.c
491 @@ -9,10 +9,10 @@
492  
493  double fmin(double x, double y)
494  {
495 -  if (__fpclassify(x) == FP_NAN)
496 -    return x;
497 -  if (__fpclassify(y) == FP_NAN)
498 +  if (isnan(x))
499      return y;
500 +  if (isnan(y))
501 +    return x;
502  
503    return x < y ? x : y;
504  }
505 diff --git a/libm/s_nextafter.c b/libm/s_nextafter.c
506 index ee4621c..73a8ab2 100644
507 --- a/libm/s_nextafter.c
508 +++ b/libm/s_nextafter.c
509 @@ -32,7 +32,7 @@ double nextafter(double x, double y)
510         if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   /* x is nan */
511            ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     /* y is nan */
512            return x+y;
513 -       if(x==y) return x;              /* x=y, return x */
514 +       if(x==y) return y;              /* x=y, return y */
515         if((ix|lx)==0) {                        /* x == 0 */
516             INSERT_WORDS(x,hy&0x80000000,1);    /* return +-minsubnormal */
517             y = x*x;
518 @@ -68,3 +68,5 @@ double nextafter(double x, double y)
519         return x;
520  }
521  libm_hidden_def(nextafter)
522 +strong_alias_untyped(nextafter, nexttoward)
523 +libm_hidden_def(nexttoward)
524 diff --git a/test/math/compile_test.c b/test/math/compile_test.c
525 index ab8c40c..aedfde6 100644
526 --- a/test/math/compile_test.c
527 +++ b/test/math/compile_test.c
528 @@ -22,11 +22,11 @@ r += exp2f(float_x);
529  r += expf(float_x);
530  r += expm1f(float_x);
531  r += fabsf(float_x);
532 -/*r += fdimf(float_x, float_x); - uclibc does not have it (yet?) */
533 +r += fdimf(float_x, float_x);
534  r += floorf(float_x);
535 -/*r += fmaf(float_x, float_x, float_x); - uclibc does not have it (yet?) */
536 -/*r += fmaxf(float_x, float_x); - uclibc does not have it (yet?) */
537 -/*r += fminf(float_x, float_x); - uclibc does not have it (yet?) */
538 +r += fmaf(float_x, float_x, float_x);
539 +r += fmaxf(float_x, float_x);
540 +r += fminf(float_x, float_x);
541  r += fmodf(float_x, float_x);
542  r += frexpf(float_x, &int_x);
543  r += gammaf(float_x);
544 @@ -44,17 +44,17 @@ r += logf(float_x);
545  r += lrintf(float_x);
546  r += lroundf(float_x);
547  r += modff(float_x, &float_x);
548 -/*r += nearbyintf(float_x); - uclibc does not have it (yet?) */
549 -/*r += nexttowardf(float_x, long_double_x); - uclibc does not have it (yet?) */
550 +r += nearbyintf(float_x);
551 +r += nexttowardf(float_x, long_double_x);
552  r += powf(float_x, float_x);
553  r += remainderf(float_x, float_x);
554 -/*r += remquof(float_x, float_x, &int_x); - uclibc does not have it (yet?) */
555 +r += remquof(float_x, float_x, &int_x);
556  r += rintf(float_x);
557  r += roundf(float_x);
558  #ifdef __UCLIBC_SUSV3_LEGACY__
559  r += scalbf(float_x, float_x);
560  #endif
561 -/*r += scalblnf(float_x, long_x); - uclibc does not have it (yet?) */
562 +r += scalblnf(float_x, long_x);
563  r += scalbnf(float_x, int_x);
564  r += significandf(float_x);
565  r += sinf(float_x);
566 @@ -62,7 +62,7 @@ r += sinhf(float_x);
567  r += sqrtf(float_x);
568  r += tanf(float_x);
569  r += tanhf(float_x);
570 -/*r += tgammaf(float_x); - uclibc does not have it (yet?) */
571 +r += tgammaf(float_x);
572  r += truncf(float_x);
573  return r;
574  }
575 @@ -116,7 +116,7 @@ r += lroundl(long_double_x);
576  r += modfl(long_double_x, &long_double_x);
577  r += nearbyintl(long_double_x);
578  r += nextafterl(long_double_x, long_double_x);
579 -/* r += nexttowardl(long_double_x, long_double_x); - uclibc doesn't provide this [yet?] */
580 +r += nexttowardl(long_double_x, long_double_x);
581  r += powl(long_double_x, long_double_x);
582  r += remainderl(long_double_x, long_double_x);
583  r += remquol(long_double_x, long_double_x, &int_x);
584 diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
585 index d0f0a0c..8f0db3c 100644
586 --- a/test/math/libm-test.inc
587 +++ b/test/math/libm-test.inc
588 @@ -115,6 +115,9 @@
589  # define _GNU_SOURCE
590  #endif
591  
592 +#undef __CHK_COMPLEX_STUFF
593 +#define __CHK_COMPLEX_STUFF 0
594 +
595  #include "libm-test-ulps.h"
596  #include <complex.h>
597  #include <math.h>
598 @@ -1120,8 +1123,10 @@ cacosh_test (void)
599  
600    END (cacosh, complex);
601  }
602 +#endif
603  
604  
605 +#if __CHK_COMPLEX_STUFF
606  static void
607  carg_test (void)
608  {
609 @@ -1188,7 +1193,9 @@ carg_test (void)
610  
611    END (carg);
612  }
613 +#endif /* __CHK_COMPLEX_STUFF */
614  
615 +#if 0
616  static void
617  casin_test (void)
618  {
619 @@ -1683,7 +1690,7 @@ ceil_test (void)
620  }
621  
622  
623 -#if 0
624 +#if __CHK_COMPLEX_STUFF
625  static void
626  cexp_test (void)
627  {
628 @@ -1746,8 +1753,9 @@ cexp_test (void)
629  
630    END (cexp, complex);
631  }
632 +#endif /* __CHK_COMPLEX_STUFF */
633  
634 -
635 +#if 0
636  static void
637  cimag_test (void)
638  {
639 @@ -2588,7 +2596,6 @@ fabs_test (void)
640  }
641  
642  
643 -#if 0
644  static void
645  fdim_test (void)
646  {
647 @@ -2624,7 +2631,6 @@ fdim_test (void)
648  
649    END (fdim);
650  }
651 -#endif
652  
653  
654  static void
655 @@ -2694,7 +2700,6 @@ floor_test (void)
656  }
657  
658  
659 -#if 0
660  static void
661  fma_test (void)
662  {
663 @@ -2797,7 +2802,6 @@ fmin_test (void)
664  
665    END (fmin);
666  }
667 -#endif
668  
669  
670  static void
671 @@ -3002,7 +3006,7 @@ isnormal_test (void)
672    END (isnormal);
673  }
674  
675 -#if defined __DO_XSI_MATH__
676 +#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
677  static void
678  j0_test (void)
679  {
680 @@ -3629,7 +3633,6 @@ modf_test (void)
681  }
682  
683  
684 -#if 0
685  static void
686  nearbyint_test (void)
687  {
688 @@ -3710,7 +3713,6 @@ nexttoward_test (void)
689  
690    END (nexttoward);
691  }
692 -#endif
693  
694  
695  static void
696 @@ -3950,7 +3952,6 @@ remainder_test (void)
697    END (remainder);
698  }
699  
700 -#if 0
701  static void
702  remquo_test (void)
703  {
704 @@ -3981,7 +3982,6 @@ remquo_test (void)
705  
706    END (remquo);
707  }
708 -#endif
709  
710  static void
711  rint_test (void)
712 @@ -4229,12 +4229,12 @@ round_test (void)
713  #endif
714  
715  
716 +#ifdef __UCLIBC_SUSV3_LEGACY__
717  static void
718  scalb_test (void)
719  {
720    START (scalb);
721  #ifndef TEST_LDOUBLE /* uclibc doesn't have scalbl */
722 -#ifdef __UCLIBC_SUSV3_LEGACY__ /* scalbf is susv3 legacy */
723  
724    TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION);
725    TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION);
726 @@ -4285,11 +4285,10 @@ scalb_test (void)
727  
728    TEST_ff_f (scalb, 0.8L, 4, 12.8L);
729    TEST_ff_f (scalb, -0.854375L, 5, -27.34L);
730 -#endif /* __UCLIBC_SUSV3_LEGACY__ */
731  #endif /* TEST_LDOUBLE */
732    END (scalb);
733  }
734 -
735 +#endif
736  
737  static void
738  scalbn_test (void)
739 @@ -4313,7 +4312,6 @@ scalbn_test (void)
740  }
741  
742  
743 -#if 0
744  static void
745  scalbln_test (void)
746  {
747 @@ -4334,7 +4332,6 @@ scalbln_test (void)
748  
749    END (scalbn);
750  }
751 -#endif
752  
753  
754  static void
755 @@ -4539,7 +4536,6 @@ tanh_test (void)
756    END (tanh);
757  }
758  
759 -#if 0
760  static void
761  tgamma_test (void)
762  {
763 @@ -4571,7 +4567,6 @@ tgamma_test (void)
764  
765    END (tgamma);
766  }
767 -#endif
768  
769  
770  #if 0
771 @@ -4651,7 +4646,7 @@ trunc_test (void)
772  }
773  #endif
774  
775 -#if defined __DO_XSI_MATH__
776 +#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
777  static void
778  y0_test (void)
779  {
780 @@ -4979,11 +4974,11 @@ main (int argc, char **argv)
781    logb_test ();
782    modf_test ();
783    ilogb_test ();
784 +#ifdef __UCLIBC_SUSV3_LEGACY__
785    scalb_test ();
786 +#endif
787    scalbn_test ();
788 -#if 0
789    scalbln_test ();
790 -#endif
791    significand_test ();
792  
793    /* Power and absolute value functions:  */
794 @@ -4998,16 +4993,12 @@ main (int argc, char **argv)
795    erfc_test ();
796    gamma_test ();
797    lgamma_test ();
798 -#if 0
799    tgamma_test ();
800 -#endif
801  
802    /* Nearest integer functions:  */
803    ceil_test ();
804    floor_test ();
805 -#if 0
806    nearbyint_test ();
807 -#endif
808    rint_test ();
809  #if 0
810    rint_test_tonearest ();
811 @@ -5025,13 +5016,10 @@ main (int argc, char **argv)
812    /* Remainder functions:  */
813    fmod_test ();
814    remainder_test ();
815 -#if 0
816    remquo_test ();
817 -#endif
818  
819    /* Manipulation functions:  */
820    copysign_test ();
821 -#if 0
822    nextafter_test ();
823    nexttoward_test ();
824  
825 @@ -5043,24 +5031,29 @@ main (int argc, char **argv)
826    /* Multiply and add:  */
827    fma_test ();
828  
829 +
830    /* Complex functions:  */
831    cabs_test ();
832 +#if __CHK_COMPLEX_STUFF
833 +#if 0
834    cacos_test ();
835    cacosh_test ();
836 +#endif
837    carg_test ();
838 +#if 0
839    casin_test ();
840    casinh_test ();
841    catan_test ();
842    catanh_test ();
843    ccos_test ();
844    ccosh_test ();
845 +#endif
846    cexp_test ();
847 +#if 0
848    cimag_test ();
849    clog10_test ();
850    clog_test ();
851 -#if 0
852    conj_test ();
853 -#endif
854    cpow_test ();
855    cproj_test ();
856    creal_test ();
857 @@ -5070,9 +5063,10 @@ main (int argc, char **argv)
858    ctan_test ();
859    ctanh_test ();
860  #endif
861 +#endif /* __CHK_COMPLEX_STUFF */
862  
863    /* Bessel functions:  */
864 -#if defined __DO_XSI_MATH__
865 +#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
866    j0_test ();
867    j1_test ();
868    jn_test ();
869 --
870 cgit v0.9.1