remove debugging code
[buildroot.git] / toolchain / uClibc / uClibc.074-libm-ldouble-finite.00.patch
blobe8674b756544593e5f88f4497bacf6a45f3a2eb7
1 Index: uClibc/libm/s_isinff.c
2 ===================================================================
3 --- uClibc/libm/s_isinff.c (revision 24432)
4 +++ uClibc/libm/s_isinff.c (working copy)
5 @@ -11,7 +11,6 @@
6 #include "math.h"
7 #include "math_private.h"
9 -libm_hidden_proto(__isinff)
10 int
11 __isinff (float x)
13 @@ -23,4 +22,3 @@ __isinff (float x)
14 return ~(t >> 31) & (ix >> 30);
16 libm_hidden_def(__isinff)
17 -strong_alias (__isinff, isinff)
18 Index: uClibc/libm/s_finite.c
19 ===================================================================
20 --- uClibc/libm/s_finite.c (revision 24432)
21 +++ uClibc/libm/s_finite.c (working copy)
22 @@ -28,5 +28,3 @@ int __finite(double x)
23 return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
25 libm_hidden_def(__finite)
26 -weak_alias(__finite,finite)
27 -libm_hidden_weak(finite)
28 Index: uClibc/libm/Makefile.in
29 ===================================================================
30 --- uClibc/libm/Makefile.in (revision 24432)
31 +++ uClibc/libm/Makefile.in (working copy)
32 @@ -86,13 +86,13 @@ FL_MOBJ := \
33 scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
34 tgammaf.o truncf.o cargf.o llrintf.o
36 -LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cbrtl.o \
37 +LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cargl.o cbrtl.o \
38 ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \
39 - expm1l.o fabsl.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o \
40 - frexpl.o gammal.o hypotl.o ilogbl.o ldexpl.o lgammal.o llrintl.o \
41 + expm1l.o fabsl.o finitel.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o fpclassifyl.o \
42 + frexpl.o gammal.o hypotl.o ilogbl.o isinfl.o isnanl.o ldexpl.o lgammal.o llrintl.o \
43 llroundl.o log10l.o log1pl.o XXXlog2l.o logbl.o logl.o lrintl.o lroundl.o \
44 modfl.o nearbyintl.o nextafterl.o XXXnexttowardl.o powl.o remainderl.o \
45 - remquol.o rintl.o roundl.o scalblnl.o scalbnl.o sinhl.o sinl.o sqrtl.o \
46 + remquol.o rintl.o roundl.o scalblnl.o scalbnl.o signbitl.o sinhl.o sinl.o sqrtl.o \
47 tanhl.o tanl.o tgammal.o truncl.o
48 else
49 # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
50 @@ -139,21 +139,21 @@ libm_SRC := $(patsubst %.c,$(libm_DIR)/%
51 libm_OBJ := $(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC))
53 ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
54 -libm_MSRC2 := $(libm_DIR)/$(LD_MSRC)
55 -libm_MOBJ2 := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ))
56 +libm_MSRC_LD := $(libm_DIR)/$(LD_MSRC)
57 +libm_MOBJ_LD := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ))
58 endif
59 -libm_MSRC := $(libm_DIR)/$(FL_MSRC)
60 -libm_MOBJ := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
61 +libm_MSRC_FL := $(libm_DIR)/$(FL_MSRC)
62 +libm_MOBJ_FL := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
65 ifneq ($(DOMULTI),n)
66 -CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
67 +CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_FL))))
68 ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
69 -CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ2))))
70 +CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_LD))))
71 endif
72 endif
74 -libm_OBJS := $(libm_OBJ) $(libm_MOBJ) $(libm_MOBJ2)
75 +libm_OBJS := $(libm_OBJ) $(libm_MOBJ_FL) $(libm_MOBJ_LD)
77 ifeq ($(DOPIC),y)
78 libm-a-y += $(libm_OBJS:.o=.os)
79 @@ -182,7 +182,7 @@ $(libm_OUT)/libm_so.a: $(libm-so-y)
80 $(Q)$(RM) $@
81 $(do_ar)
83 -$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_MSRC2) $(libm_ARCH_SRC)
84 +$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC_FL) $(libm_MSRC_LD) $(libm_ARCH_SRC)
85 $(Q)$(RM) $@
86 $(compile-m)
88 @@ -191,17 +191,24 @@ $(top_builddir)lib/libm.a: $(libm-a-y)
89 $(Q)$(RM) $@
90 $(do_ar)
92 -$(libm_MOBJ): $(libm_MSRC)
93 +$(libm_MOBJ_FL): $(libm_MSRC_FL)
94 $(compile.m)
96 -$(libm_MOBJ2): $(libm_MSRC2)
97 +$(libm_MOBJ_LD): $(libm_MSRC_LD)
98 $(compile.m)
100 -$(libm_MOBJ:.o=.os): $(libm_MSRC)
101 +$(libm_MOBJ_FL:.o=.os): $(libm_MSRC_FL)
102 $(compile.m)
104 -$(libm_MOBJ2:.o=.os): $(libm_MSRC2)
105 +$(libm_MOBJ_LD:.o=.os): $(libm_MSRC_LD)
106 $(compile.m)
108 +# spare us from adding a gazillion dummy two-liner files
109 +$(libm_MOBJ_FL:.o=.i): $(libm_MSRC_FL)
110 + $(compile.mi)
112 +$(libm_MOBJ_LD:.o=.i): $(libm_MSRC_LD)
113 + $(compile.mi)
115 libm_clean:
116 $(do_rm) $(addprefix $(libm_OUT)/,$(foreach e, o os oS a,$(foreach d, *. */*. */*/*.,$(d)$(e))))
117 Index: uClibc/libm/s_finitef.c
118 ===================================================================
119 --- uClibc/libm/s_finitef.c (revision 24432)
120 +++ uClibc/libm/s_finitef.c (working copy)
121 @@ -21,7 +21,6 @@
122 #include "math.h"
123 #include "math_private.h"
125 -libm_hidden_proto(__finitef)
126 int __finitef(float x)
128 int32_t ix;
129 @@ -29,4 +28,3 @@ int __finitef(float x)
130 return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31);
132 libm_hidden_def(__finitef)
133 -strong_alias(__finitef,finitef)
134 Index: uClibc/libm/ldouble_wrappers.c
135 ===================================================================
136 --- uClibc/libm/ldouble_wrappers.c (revision 24432)
137 +++ uClibc/libm/ldouble_wrappers.c (working copy)
138 @@ -14,6 +14,8 @@
139 /* Prevent math.h from defining colliding inlines */
140 #undef __USE_EXTERN_INLINES
141 #include "math.h"
142 +#include <complex.h>
145 /* Implement the following, as defined by SuSv3 */
146 #if 0
147 @@ -24,6 +26,7 @@ long double asinl(long double);
148 long double atan2l(long double, long double);
149 long double atanhl(long double);
150 long double atanl(long double);
151 +long double cargl(long double complex);
152 long double cbrtl(long double);
153 long double ceill(long double);
154 long double copysignl(long double, long double);
155 @@ -131,6 +134,14 @@ long double atanl (long double x)
156 #endif
159 +#ifdef L_cargl
160 +long double cargl (long double complex x)
162 + return (long double) carg( (double complex)x );
164 +#endif
167 #ifdef L_cbrtl
168 long double cbrtl (long double x)
170 @@ -524,3 +535,48 @@ long double truncl (long double x)
171 return (long double) trunc( (double)x );
173 #endif
176 +#ifdef __DO_C99_MATH__
178 +#ifdef L_fpclassifyl
179 +int __fpclassifyl (long double x)
181 + return __fpclassify ( (double) x );
183 +libm_hidden_def(__fpclassifyl)
184 +#endif
186 +#ifdef L_finitel
187 +int __finitel (long double x)
189 + return __finite ( (double)x );
191 +libm_hidden_def(__finitel)
192 +#endif
194 +#ifdef L_signbitl
195 +int __signbitl (long double x)
197 + return __signbitl ( (double)x );
199 +libm_hidden_def(__signbitl)
200 +#endif
202 +#ifdef L_isnanl
203 +int __isnanl (long double x)
205 + return __isnan ( (double)x );
207 +libm_hidden_def(__isnanl)
208 +#endif
210 +#ifdef L_isinfl
211 +int __isinfl (long double x)
213 + return __isinf ( (double)x );
215 +libm_hidden_def(__isinfl)
216 +#endif
218 +#endif
219 Index: uClibc/libm/w_exp.c
220 ===================================================================
221 --- uClibc/libm/w_exp.c (revision 24432)
222 +++ uClibc/libm/w_exp.c (working copy)
223 @@ -42,7 +42,7 @@ u_threshold= -7.45133219101941108420e+02
224 double z;
225 z = __ieee754_exp(x);
226 if(_LIB_VERSION == _IEEE_) return z;
227 - if(finite(x)) {
228 + if(isfinite(x)) {
229 if(x>o_threshold)
230 return __kernel_standard(x,x,6); /* exp overflow */
231 else if(x<u_threshold)
232 Index: uClibc/libm/s_fma.c
233 ===================================================================
234 --- uClibc/libm/s_fma.c (revision 24432)
235 +++ uClibc/libm/s_fma.c (working copy)
236 @@ -20,11 +20,9 @@
238 #include <math.h>
240 -libm_hidden_proto(__fma)
241 double
242 -__fma (double x, double y, double z)
243 +fma (double x, double y, double z)
245 return (x * y) + z;
247 -libm_hidden_def(__fma)
248 -strong_alias (__fma, fma)
249 +libm_hidden_def(fma)
250 Index: uClibc/libm/s_signbitf.c
251 ===================================================================
252 --- uClibc/libm/s_signbitf.c (revision 24432)
253 +++ uClibc/libm/s_signbitf.c (working copy)
254 @@ -24,7 +24,6 @@
255 #include <math.h>
256 #include "math_private.h"
258 -libm_hidden_proto(__signbitf)
260 __signbitf (float x)
262 Index: uClibc/libm/w_log2.c
263 ===================================================================
264 --- uClibc/libm/w_log2.c (revision 24432)
265 +++ uClibc/libm/w_log2.c (working copy)
266 @@ -11,4 +11,3 @@ double log2 (double d)
268 return __ieee754_log2 (d);
270 -libm_hidden_def(log2)
271 Index: uClibc/libm/w_jn.c
272 ===================================================================
273 --- uClibc/libm/w_jn.c (revision 24432)
274 +++ uClibc/libm/w_jn.c (working copy)
275 @@ -62,7 +62,6 @@ static char rcsid[] = "$NetBSD: w_jn.c,v
276 return z;
277 #endif
279 -libm_hidden_def(jn)
281 #ifdef __STDC__
282 double yn(int n, double x) /* wrapper yn */
283 @@ -91,4 +90,3 @@ libm_hidden_def(jn)
284 return z;
285 #endif
287 -libm_hidden_def(yn)
288 Index: uClibc/libm/s_isnanf.c
289 ===================================================================
290 --- uClibc/libm/s_isnanf.c (revision 24432)
291 +++ uClibc/libm/s_isnanf.c (working copy)
292 @@ -21,7 +21,6 @@
293 #include "math.h"
294 #include "math_private.h"
296 -libm_hidden_proto(__isnanf)
297 int __isnanf(float x)
299 int32_t ix;
300 @@ -30,5 +29,4 @@ int __isnanf(float x)
301 ix = 0x7f800000 - ix;
302 return (int)(((u_int32_t)(ix))>>31);
304 -libm_hidden_def (__isnanf)
305 -weak_alias (__isnanf, isnanf)
306 +libm_hidden_def(__isnanf)
307 Index: uClibc/libm/w_j1.c
308 ===================================================================
309 --- uClibc/libm/w_j1.c (revision 24432)
310 +++ uClibc/libm/w_j1.c (working copy)
311 @@ -40,7 +40,6 @@ static char rcsid[] = "$NetBSD: w_j1.c,v
312 return z;
313 #endif
315 -libm_hidden_def(j1)
317 #ifdef __STDC__
318 double y1(double x) /* wrapper y1 */
319 @@ -69,4 +68,3 @@ libm_hidden_def(j1)
320 return z;
321 #endif
323 -libm_hidden_def(y1)
324 Index: uClibc/libm/w_lgamma_r.c
325 ===================================================================
326 --- uClibc/libm/w_lgamma_r.c (revision 24432)
327 +++ uClibc/libm/w_lgamma_r.c (working copy)
328 @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_lgamma
329 double y;
330 y = __ieee754_lgamma_r(x,signgamp);
331 if(_LIB_VERSION == _IEEE_) return y;
332 - if(!finite(y)&&finite(x)) {
333 + if(!isfinite(y)&&isfinite(x)) {
334 if(floor(x)==x&&x<=0.0)
335 return __kernel_standard(x,x,15); /* lgamma pole */
336 else
337 @@ -43,4 +43,3 @@ static char rcsid[] = "$NetBSD: w_lgamma
338 return y;
339 #endif
341 -libm_hidden_def(lgamma_r)
342 Index: uClibc/libm/w_hypot.c
343 ===================================================================
344 --- uClibc/libm/w_hypot.c (revision 24432)
345 +++ uClibc/libm/w_hypot.c (working copy)
346 @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_hypot.
347 double z;
348 z = __ieee754_hypot(x,y);
349 if(_LIB_VERSION == _IEEE_) return z;
350 - if((!finite(z))&&finite(x)&&finite(y))
351 + if((!isfinite(z))&&isfinite(x)&&isfinite(y))
352 return __kernel_standard(x,y,4); /* hypot overflow */
353 else
354 return z;
355 Index: uClibc/libm/s_isinf.c
356 ===================================================================
357 --- uClibc/libm/s_isinf.c (revision 24432)
358 +++ uClibc/libm/s_isinf.c (working copy)
359 @@ -22,5 +22,3 @@ __isinf (double x)
360 return ~(lx >> 31) & (hx >> 30);
362 libm_hidden_def(__isinf)
363 -weak_alias (__isinf, isinf)
364 -libm_hidden_weak(isinf)
365 Index: uClibc/libm/s_significand.c
366 ===================================================================
367 --- uClibc/libm/s_significand.c (revision 24432)
368 +++ uClibc/libm/s_significand.c (working copy)
369 @@ -33,4 +33,3 @@ static char rcsid[] = "$NetBSD: s_signif
371 return __ieee754_scalb(x,(double) -ilogb(x));
373 -libm_hidden_def(significand)
374 Index: uClibc/libm/w_gamma.c
375 ===================================================================
376 --- uClibc/libm/w_gamma.c (revision 24432)
377 +++ uClibc/libm/w_gamma.c (working copy)
378 @@ -37,7 +37,7 @@ libm_hidden_proto(signgam)
379 double y;
380 y = __ieee754_lgamma_r(x,&signgam);
381 if(_LIB_VERSION == _IEEE_) return y;
382 - if(!finite(y)&&finite(x)) {
383 + if(!isfinite(y)&&isfinite(x)) {
384 if(floor(x)==x&&x<=0.0)
385 return __kernel_standard(x,x,41); /* gamma pole */
386 else
387 @@ -46,4 +46,3 @@ libm_hidden_proto(signgam)
388 return y;
389 #endif
391 -libm_hidden_def(gamma)
392 Index: uClibc/libm/w_drem.c
393 ===================================================================
394 --- uClibc/libm/w_drem.c (revision 24432)
395 +++ uClibc/libm/w_drem.c (working copy)
396 @@ -12,4 +12,3 @@ double drem(double x, double y)
398 return remainder(x, y);
400 -libm_hidden_def(drem)
401 Index: uClibc/libm/s_fpclassify.c
402 ===================================================================
403 --- uClibc/libm/s_fpclassify.c (revision 24432)
404 +++ uClibc/libm/s_fpclassify.c (working copy)
405 @@ -40,4 +40,4 @@ __fpclassify (double x)
407 return retval;
409 -libm_hidden_def (__fpclassify)
410 +libm_hidden_def(__fpclassify)
411 Index: uClibc/libm/w_sinh.c
412 ===================================================================
413 --- uClibc/libm/w_sinh.c (revision 24432)
414 +++ uClibc/libm/w_sinh.c (working copy)
415 @@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: w_sinh.c
416 double z;
417 z = __ieee754_sinh(x);
418 if(_LIB_VERSION == _IEEE_) return z;
419 - if(!finite(z)&&finite(x)) {
420 + if(!isfinite(z)&&isfinite(x)) {
421 return __kernel_standard(x,x,25); /* sinh overflow */
422 } else
423 return z;
424 Index: uClibc/libm/e_scalb.c
425 ===================================================================
426 --- uClibc/libm/e_scalb.c (revision 24432)
427 +++ uClibc/libm/e_scalb.c (working copy)
428 @@ -44,7 +44,7 @@ static char rcsid[] = "$NetBSD: e_scalb.
429 return scalbn(x,fn);
430 #else
431 if (isnan(x)||isnan(fn)) return x*fn;
432 - if (!finite(fn)) {
433 + if (!isfinite(fn)) {
434 if(fn>0.0) return x*fn;
435 else return x/(-fn);
437 Index: uClibc/libm/float_wrappers.c
438 ===================================================================
439 --- uClibc/libm/float_wrappers.c (revision 24432)
440 +++ uClibc/libm/float_wrappers.c (working copy)
441 @@ -39,6 +39,7 @@ float asinhf(float);
442 float atan2f(float, float);
443 float atanf(float);
444 float atanhf(float);
445 +float cargf(float complex);
446 float cbrtf(float);
447 float ceilf(float);
448 float copysignf(float, float);
449 @@ -136,7 +137,7 @@ float atanhf (float x)
450 #ifdef L_cargf
451 float cargf (float complex x)
453 - return (float) carg( (double)x );
454 + return (float) carg( (double complex)x );
456 #endif
458 @@ -535,3 +536,10 @@ float truncf (float x)
459 return (float) trunc( (double)x );
461 #endif
463 +#ifdef L_fmaf
464 +float fmaf (float x, float y, float z)
466 + return (float) fma( (double)x, (double)y, (double)z );
468 +#endif
469 Index: uClibc/libm/s_isnan.c
470 ===================================================================
471 --- uClibc/libm/s_isnan.c (revision 24432)
472 +++ uClibc/libm/s_isnan.c (working copy)
473 @@ -18,12 +18,7 @@
474 #include "math.h"
475 #include "math_private.h"
477 -#ifdef __STDC__
478 - int __isnan(double x)
479 -#else
480 - int __isnan(x)
481 - double x;
482 -#endif
483 +int __isnan(double x)
485 int32_t hx,lx;
486 EXTRACT_WORDS(hx,lx,x);
487 @@ -33,5 +28,3 @@
488 return (int)(((u_int32_t)hx)>>31);
490 libm_hidden_def(__isnan)
491 -weak_alias(__isnan,isnan)
492 -libm_hidden_weak(isnan)
493 Index: uClibc/libm/s_ldexp.c
494 ===================================================================
495 --- uClibc/libm/s_ldexp.c (revision 24432)
496 +++ uClibc/libm/s_ldexp.c (working copy)
497 @@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: s_ldexp.
498 double value; int exp;
499 #endif
501 - if(!finite(value)||value==0.0) return value;
502 + if(!isfinite(value)||value==0.0) return value;
503 value = scalbn(value,exp);
504 - if(!finite(value)||value==0.0) errno = ERANGE;
505 + if(!isfinite(value)||value==0.0) errno = ERANGE;
506 return value;
508 libm_hidden_def(ldexp)
509 Index: uClibc/libm/w_j0.c
510 ===================================================================
511 --- uClibc/libm/w_j0.c (revision 24432)
512 +++ uClibc/libm/w_j0.c (working copy)
513 @@ -39,7 +39,6 @@ static char rcsid[] = "$NetBSD: w_j0.c,v
514 return z;
515 #endif
517 -libm_hidden_def(j0)
519 #ifdef __STDC__
520 double y0(double x) /* wrapper y0 */
521 @@ -68,4 +67,3 @@ libm_hidden_def(j0)
522 return z;
523 #endif
525 -libm_hidden_def(y0)
526 Index: uClibc/libm/w_scalb.c
527 ===================================================================
528 --- uClibc/libm/w_scalb.c (revision 24432)
529 +++ uClibc/libm/w_scalb.c (working copy)
530 @@ -46,16 +46,15 @@ static char rcsid[] = "$NetBSD: w_scalb.
531 double z;
532 z = __ieee754_scalb(x,fn);
533 if(_LIB_VERSION == _IEEE_) return z;
534 - if(!(finite(z)||isnan(z))&&finite(x)) {
535 + if(!(isfinite(z)||isnan(z))&&isfinite(x)) {
536 return __kernel_standard(x,(double)fn,32); /* scalb overflow */
538 if(z==0.0&&z!=x) {
539 return __kernel_standard(x,(double)fn,33); /* scalb underflow */
541 #ifndef _SCALB_INT
542 - if(!finite(fn)) errno = ERANGE;
543 + if(!isfinite(fn)) errno = ERANGE;
544 #endif
545 return z;
546 #endif
548 -libm_hidden_def(scalb)
549 Index: uClibc/libm/w_lgamma.c
550 ===================================================================
551 --- uClibc/libm/w_lgamma.c (revision 24432)
552 +++ uClibc/libm/w_lgamma.c (working copy)
553 @@ -37,7 +37,7 @@ libm_hidden_proto(signgam)
554 double y;
555 y = __ieee754_lgamma_r(x,&signgam);
556 if(_LIB_VERSION == _IEEE_) return y;
557 - if(!finite(y)&&finite(x)) {
558 + if(!isfinite(y)&&isfinite(x)) {
559 if(floor(x)==x&&x<=0.0)
560 return __kernel_standard(x,x,15); /* lgamma pole */
561 else
562 Index: uClibc/libm/w_gamma_r.c
563 ===================================================================
564 --- uClibc/libm/w_gamma_r.c (revision 24432)
565 +++ uClibc/libm/w_gamma_r.c (working copy)
566 @@ -37,7 +37,7 @@ libm_hidden_proto(gamma_r)
567 double y;
568 y = __ieee754_lgamma_r(x,signgamp);
569 if(_LIB_VERSION == _IEEE_) return y;
570 - if(!finite(y)&&finite(x)) {
571 + if(!isfinite(y)&&isfinite(x)) {
572 if(floor(x)==x&&x<=0.0)
573 return __kernel_standard(x,x,41); /* gamma pole */
574 else
575 Index: uClibc/libm/s_fpclassifyf.c
576 ===================================================================
577 --- uClibc/libm/s_fpclassifyf.c (revision 24432)
578 +++ uClibc/libm/s_fpclassifyf.c (working copy)
579 @@ -21,9 +21,7 @@
580 #include <math.h>
581 #include "math_private.h"
583 -libm_hidden_proto(__fpclassifyf)
584 -int
585 -__fpclassifyf (float x)
586 +int __fpclassifyf (float x)
588 u_int32_t wx;
589 int retval = FP_NORMAL;
590 @@ -39,4 +37,4 @@ __fpclassifyf (float x)
592 return retval;
594 -libm_hidden_def (__fpclassifyf)
595 +libm_hidden_def(__fpclassifyf)
596 Index: uClibc/libm/w_pow.c
597 ===================================================================
598 --- uClibc/libm/w_pow.c (revision 24432)
599 +++ uClibc/libm/w_pow.c (working copy)
600 @@ -41,19 +41,19 @@
601 if(x==0.0){
602 if(y==0.0)
603 return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
604 - if(finite(y)&&y<0.0)
605 + if(isfinite(y)&&y<0.0)
606 return __kernel_standard(x,y,23); /* pow(0.0,negative) */
607 return z;
609 - if(!finite(z)) {
610 - if(finite(x)&&finite(y)) {
611 + if(!isfinite(z)) {
612 + if(isfinite(x)&&isfinite(y)) {
613 if(isnan(z))
614 return __kernel_standard(x,y,24); /* pow neg**non-int */
615 else
616 return __kernel_standard(x,y,21); /* pow overflow */
619 - if(z==0.0&&finite(x)&&finite(y))
620 + if(z==0.0&&isfinite(x)&&isfinite(y))
621 return __kernel_standard(x,y,22); /* pow underflow */
622 return z;
623 #endif
624 Index: uClibc/libm/w_tgamma.c
625 ===================================================================
626 --- uClibc/libm/w_tgamma.c (revision 24432)
627 +++ uClibc/libm/w_tgamma.c (working copy)
628 @@ -35,7 +35,7 @@ libm_hidden_proto(signgam)
629 #else
630 if(_LIB_VERSION == _IEEE_) return y;
632 - if(!finite(y)&&finite(x)) {
633 + if(!isfinite(y)&&isfinite(x)) {
634 if(floor(x)==x&&x<=0.0)
635 return __kernel_standard(x,x,41); /* tgamma pole */
636 else
637 Index: uClibc/include/math.h
638 ===================================================================
639 --- uClibc/include/math.h (revision 24432)
640 +++ uClibc/include/math.h (working copy)
641 @@ -55,15 +55,32 @@ __BEGIN_DECLS
642 __MATHDECL (_Mdouble_,function,suffix, args)
643 #define __MATHDECL(type, function,suffix, args) \
644 __MATHDECL_1(type, function,suffix, args); \
645 - __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
646 + /* __MATHDECL_1(type, __CONCAT(__,function),suffix, args) */
647 #define __MATHCALLX(function,suffix, args, attrib) \
648 __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
649 #define __MATHDECLX(type, function,suffix, args, attrib) \
650 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
651 - __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
652 + __MATHDECLI_MAINVARIANT(function) \
653 + /* libm_hidden_proto(__MATH_PRECNAME(function,suffix)) */ \
654 + /* __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) */
655 #define __MATHDECL_1(type, function,suffix, args) \
656 extern type __MATH_PRECNAME(function,suffix) args __THROW
657 +/* Decls which are also used internally in libm.
658 + Only the main variant is used internally, no need to try to avoid relocs
659 + for the {l,f} variants. */
660 +#define __MATHCALLI(function,suffix, args) \
661 + __MATHDECLI (_Mdouble_,function,suffix, args)
662 +#define __MATHDECLI(type, function,suffix, args) \
663 + __MATHDECL_1(type, function,suffix, args); \
664 + __MATHDECLI_MAINVARIANT(function)
665 +/* Private helpers for purely macro impls below.
666 + Only make __foo{,f,l} visible but not (the macro-only) foo. */
667 +#define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
668 + __MATHDECL_1(type, __CONCAT(__,function),suffix, args) \
669 + __attribute__ (attrib); \
670 + libm_hidden_proto(__MATH_PRECNAME(__##function,suffix))
672 +#define __MATHDECLI_MAINVARIANT(x) libm_hidden_proto(x)
673 #define _Mdouble_ double
674 #define __MATH_PRECNAME(name,r) __CONCAT(name,r)
675 # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
676 @@ -72,7 +89,9 @@ __BEGIN_DECLS
677 #undef _Mdouble_
678 #undef _Mdouble_BEGIN_NAMESPACE
679 #undef _Mdouble_END_NAMESPACE
680 -#undef __MATH_PRECNAME
681 +#undef __MATH_PRECNAME
682 +#undef __MATHDECLI_MAINVARIANT
683 +#define __MATHDECLI_MAINVARIANT(x)
685 #if defined __USE_MISC || defined __USE_ISOC99
687 Index: uClibc/Makerules
688 ===================================================================
689 --- uClibc/Makerules (revision 24432)
690 +++ uClibc/Makerules (working copy)
691 @@ -80,6 +80,7 @@ pur_disp_compile.s = echo " "CC-S $(sho
692 pur_disp_compile.u = echo " "CC $(show_objs)
693 pur_disp_compile.S = echo " "AS $(show_objs)
694 pur_disp_compile.m = $(pur_disp_compile.c)
695 +pur_disp_compile.mi= echo " "CPP-m $(show_objs)
696 pur_disp_compile-m = echo " "CC-m $(show_objs)
697 pur_disp_hcompile.u= echo " "HOSTCC $(show_objs)
698 pur_disp_hcompile.o= echo " "HOSTCC-o $(show_objs)
699 @@ -99,6 +100,7 @@ sil_disp_compile.s = true
700 sil_disp_compile.u = true
701 sil_disp_compile.S = true
702 sil_disp_compile.m = true
703 +sil_disp_compile.mi= true
704 sil_disp_compile-m = true
705 sil_disp_hcompile.u= true
706 sil_disp_hcompile.o= true
707 @@ -118,6 +120,7 @@ ver_disp_compile.s = echo $(cmd_compile.
708 ver_disp_compile.u = echo $(cmd_compile.u)
709 ver_disp_compile.S = echo $(cmd_compile.S)
710 ver_disp_compile.m = echo $(cmd_compile.m)
711 +ver_disp_compile.mi= echo $(cmd_compile.mi)
712 ver_disp_compile-m = echo $(cmd_compile-m)
713 ver_disp_hcompile.u= echo $(cmd_hcompile.u)
714 ver_disp_hcompile.o= echo $(cmd_hcompile.o)
715 @@ -137,6 +140,7 @@ disp_compile.s = $($(DISP)_disp_compile.
716 disp_compile.u = $($(DISP)_disp_compile.u)
717 disp_compile.S = $($(DISP)_disp_compile.S)
718 disp_compile.m = $($(DISP)_disp_compile.m)
719 +disp_compile.mi= $($(DISP)_disp_compile.mi)
720 disp_compile-m = $($(DISP)_disp_compile-m)
721 disp_hcompile.u= $($(DISP)_disp_hcompile.u)
722 disp_hcompile.o= $($(DISP)_disp_hcompile.o)
723 @@ -189,6 +193,7 @@ cmd_compile.s = $(cmd_compile.c:-c=-S)
724 cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
725 cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
726 cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
727 +cmd_compile.mi= $(cmd_compile.m:-c=-E -dD $(EXTRA_CPPFLAGS))
729 cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@))
730 cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
731 @@ -216,6 +221,7 @@ compile.i = $(call maybe_exec,compile.i
732 compile.s = $(call maybe_exec,compile.s)
733 compile.S = @$(call maybe_exec,compile.S)
734 compile.m = @$(call maybe_exec,compile.m)
735 +compile.mi= $(call maybe_exec,compile.mi)
736 compile-m = @$(disp_compile-m) ; $(cmd_compile-m) && $(cmd_t_strip)
737 do_strip = @$(disp_strip) ; $(cmd_strip)
738 do_t_strip= @$(disp_t_strip) ; $(cmd_t_strip)
739 Index: uClibc/libc/sysdeps/linux/common/bits/mathcalls.h
740 ===================================================================
741 --- uClibc/libc/sysdeps/linux/common/bits/mathcalls.h (revision 24432)
742 +++ uClibc/libc/sysdeps/linux/common/bits/mathcalls.h (working copy)
743 @@ -52,59 +52,45 @@
745 _Mdouble_BEGIN_NAMESPACE
746 /* Arc cosine of X. */
747 -__MATHCALL (acos,, (_Mdouble_ __x));
748 -libm_hidden_proto(acos)
749 +__MATHCALLI (acos,, (_Mdouble_ __x));
750 /* Arc sine of X. */
751 -__MATHCALL (asin,, (_Mdouble_ __x));
752 -libm_hidden_proto(asin)
753 +__MATHCALLI (asin,, (_Mdouble_ __x));
754 /* Arc tangent of X. */
755 -__MATHCALL (atan,, (_Mdouble_ __x));
756 -libm_hidden_proto(atan)
757 +__MATHCALLI (atan,, (_Mdouble_ __x));
758 /* Arc tangent of Y/X. */
759 -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
760 -libm_hidden_proto(atan2)
761 +__MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
763 /* Cosine of X. */
764 -__MATHCALL (cos,, (_Mdouble_ __x));
765 -libm_hidden_proto(cos)
766 +__MATHCALLI (cos,, (_Mdouble_ __x));
767 /* Sine of X. */
768 -__MATHCALL (sin,, (_Mdouble_ __x));
769 -libm_hidden_proto(sin)
770 +__MATHCALLI (sin,, (_Mdouble_ __x));
771 /* Tangent of X. */
772 -__MATHCALL (tan,, (_Mdouble_ __x));
773 -libm_hidden_proto(tan)
774 +__MATHCALLI (tan,, (_Mdouble_ __x));
776 /* Hyperbolic functions. */
778 /* Hyperbolic cosine of X. */
779 -__MATHCALL (cosh,, (_Mdouble_ __x));
780 -libm_hidden_proto(cosh)
781 +__MATHCALLI (cosh,, (_Mdouble_ __x));
782 /* Hyperbolic sine of X. */
783 -__MATHCALL (sinh,, (_Mdouble_ __x));
784 -libm_hidden_proto(sinh)
785 +__MATHCALLI (sinh,, (_Mdouble_ __x));
786 /* Hyperbolic tangent of X. */
787 -__MATHCALL (tanh,, (_Mdouble_ __x));
788 -libm_hidden_proto(tanh)
789 +__MATHCALLI (tanh,, (_Mdouble_ __x));
790 _Mdouble_END_NAMESPACE
792 #if 0 /*def __USE_GNU*/
793 /* Cosine and sine of X. */
794 __MATHDECL (void,sincos,,
795 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
796 -libm_hidden_proto(sincos)
797 #endif
799 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
800 __BEGIN_NAMESPACE_C99
801 /* Hyperbolic arc cosine of X. */
802 -__MATHCALL (acosh,, (_Mdouble_ __x));
803 -libm_hidden_proto(acosh)
804 +__MATHCALLI (acosh,, (_Mdouble_ __x));
805 /* Hyperbolic arc sine of X. */
806 -__MATHCALL (asinh,, (_Mdouble_ __x));
807 -libm_hidden_proto(asinh)
808 +__MATHCALLI (asinh,, (_Mdouble_ __x));
809 /* Hyperbolic arc tangent of X. */
810 -__MATHCALL (atanh,, (_Mdouble_ __x));
811 -libm_hidden_proto(atanh)
812 +__MATHCALLI (atanh,, (_Mdouble_ __x));
813 __END_NAMESPACE_C99
814 #endif
816 @@ -112,64 +98,51 @@ __END_NAMESPACE_C99
818 _Mdouble_BEGIN_NAMESPACE
819 /* Exponential function of X. */
820 -__MATHCALL (exp,, (_Mdouble_ __x));
821 -libm_hidden_proto(exp)
822 +__MATHCALLI (exp,, (_Mdouble_ __x));
824 /* Break VALUE into a normalized fraction and an integral power of 2. */
825 -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
826 -libm_hidden_proto(frexp)
827 +__MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent));
829 /* X times (two to the EXP power). */
830 -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent));
831 -libm_hidden_proto(ldexp)
832 +__MATHCALLI (ldexp,, (_Mdouble_ __x, int __exponent));
834 /* Natural logarithm of X. */
835 -__MATHCALL (log,, (_Mdouble_ __x));
836 -libm_hidden_proto(log)
837 +__MATHCALLI (log,, (_Mdouble_ __x));
839 /* Base-ten logarithm of X. */
840 -__MATHCALL (log10,, (_Mdouble_ __x));
841 -libm_hidden_proto(log10)
842 +__MATHCALLI (log10,, (_Mdouble_ __x));
844 /* Break VALUE into integral and fractional parts. */
845 -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
846 -libm_hidden_proto(modf)
847 +__MATHCALLI (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
848 _Mdouble_END_NAMESPACE
850 #if 0 /*def __USE_GNU*/
851 /* A function missing in all standards: compute exponent to base ten. */
852 __MATHCALL (exp10,, (_Mdouble_ __x));
853 -libm_hidden_proto(exp10)
854 /* Another name occasionally used. */
855 __MATHCALL (pow10,, (_Mdouble_ __x));
856 -libm_hidden_proto(pow10)
857 #endif
859 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
860 __BEGIN_NAMESPACE_C99
861 /* Return exp(X) - 1. */
862 -__MATHCALL (expm1,, (_Mdouble_ __x));
863 -libm_hidden_proto(expm1)
864 +__MATHCALLI (expm1,, (_Mdouble_ __x));
866 /* Return log(1 + X). */
867 -__MATHCALL (log1p,, (_Mdouble_ __x));
868 -libm_hidden_proto(log1p)
869 +__MATHCALLI (log1p,, (_Mdouble_ __x));
871 /* Return the base 2 signed integral exponent of X. */
872 -__MATHCALL (logb,, (_Mdouble_ __x));
873 -libm_hidden_proto(logb)
874 +__MATHCALLI (logb,, (_Mdouble_ __x));
875 __END_NAMESPACE_C99
876 #endif
878 #ifdef __USE_ISOC99
879 __BEGIN_NAMESPACE_C99
880 /* Compute base-2 exponential of X. */
881 -__MATHCALL (exp2,, (_Mdouble_ __x));
882 -libm_hidden_proto(exp2)
883 +__MATHCALLI (exp2,, (_Mdouble_ __x));
885 /* Compute base-2 logarithm of X. */
886 __MATHCALL (log2,, (_Mdouble_ __x));
887 -libm_hidden_proto(log2)
888 __END_NAMESPACE_C99
889 #endif
891 @@ -178,27 +151,23 @@ __END_NAMESPACE_C99
893 _Mdouble_BEGIN_NAMESPACE
894 /* Return X to the Y power. */
895 -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
896 -libm_hidden_proto(pow)
897 +__MATHCALLI (pow,, (_Mdouble_ __x, _Mdouble_ __y));
899 /* Return the square root of X. */
900 -__MATHCALL (sqrt,, (_Mdouble_ __x));
901 -libm_hidden_proto(sqrt)
902 +__MATHCALLI (sqrt,, (_Mdouble_ __x));
903 _Mdouble_END_NAMESPACE
905 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
906 __BEGIN_NAMESPACE_C99
907 /* Return `sqrt(X*X + Y*Y)'. */
908 -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
909 -libm_hidden_proto(hypot)
910 +__MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
911 __END_NAMESPACE_C99
912 #endif
914 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
915 __BEGIN_NAMESPACE_C99
916 /* Return the cube root of X. */
917 -__MATHCALL (cbrt,, (_Mdouble_ __x));
918 -libm_hidden_proto(cbrt)
919 +__MATHCALLI (cbrt,, (_Mdouble_ __x));
920 __END_NAMESPACE_C99
921 #endif
923 @@ -208,56 +177,46 @@ __END_NAMESPACE_C99
924 _Mdouble_BEGIN_NAMESPACE
925 /* Smallest integral value not less than X. */
926 __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__));
927 -libm_hidden_proto(ceil)
929 /* Absolute value of X. */
930 __MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
931 -libm_hidden_proto(fabs)
933 /* Largest integer not greater than X. */
934 __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
935 -libm_hidden_proto(floor)
937 /* Floating-point modulo remainder of X/Y. */
938 -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
939 -libm_hidden_proto(fmod)
940 +__MATHCALLI (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
943 /* Return 0 if VALUE is finite or NaN, +1 if it
944 is +Infinity, -1 if it is -Infinity. */
945 -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
946 -libm_hidden_proto(__isinf)
947 +__MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__));
949 /* Return nonzero if VALUE is finite and not NaN. */
950 -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
951 -libm_hidden_proto(__finite)
952 +__MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__));
953 _Mdouble_END_NAMESPACE
955 #ifdef __USE_MISC
956 +#if 0
957 /* Return 0 if VALUE is finite or NaN, +1 if it
958 is +Infinity, -1 if it is -Infinity. */
959 -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
960 -libm_hidden_proto(isinf)
961 +__MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__));
963 /* Return nonzero if VALUE is finite and not NaN. */
964 -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
965 -libm_hidden_proto(finite)
967 +__MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__));
968 +#endif
969 /* Return the remainder of X/Y. */
970 __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
971 -libm_hidden_proto(drem)
974 /* Return the fractional part of X after dividing out `ilogb (X)'. */
975 __MATHCALL (significand,, (_Mdouble_ __x));
976 -libm_hidden_proto(significand)
977 #endif /* Use misc. */
979 #if defined __USE_MISC || defined __USE_ISOC99
980 __BEGIN_NAMESPACE_C99
981 /* Return X with its signed changed to Y's. */
982 __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
983 -libm_hidden_proto(copysign)
984 __END_NAMESPACE_C99
985 #endif
987 @@ -265,60 +224,46 @@ __END_NAMESPACE_C99
988 __BEGIN_NAMESPACE_C99
989 /* Return representation of NaN for double type. */
990 __MATHCALLX (nan,, (__const char *__tagb), (__const__));
991 -libm_hidden_proto(nan)
992 __END_NAMESPACE_C99
993 #endif
996 /* Return nonzero if VALUE is not a number. */
997 -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
998 -libm_hidden_proto(__isnan)
999 +__MATHDECL_PRIV (int,__isnan,, (_Mdouble_ __value), (__const__));
1001 #if defined __USE_MISC || defined __USE_XOPEN
1002 /* Return nonzero if VALUE is not a number. */
1003 -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
1004 -libm_hidden_proto(isnan)
1005 +__MATHDECL_PRIV (int,isnan,, (_Mdouble_ __value), (__const__));
1007 /* Bessel functions. */
1008 __MATHCALL (j0,, (_Mdouble_));
1009 -libm_hidden_proto(j0)
1010 __MATHCALL (j1,, (_Mdouble_));
1011 -libm_hidden_proto(j1)
1012 __MATHCALL (jn,, (int, _Mdouble_));
1013 -libm_hidden_proto(jn)
1014 __MATHCALL (y0,, (_Mdouble_));
1015 -libm_hidden_proto(y0)
1016 __MATHCALL (y1,, (_Mdouble_));
1017 -libm_hidden_proto(y1)
1018 __MATHCALL (yn,, (int, _Mdouble_));
1019 -libm_hidden_proto(yn)
1020 #endif
1023 #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
1024 __BEGIN_NAMESPACE_C99
1025 /* Error and gamma functions. */
1026 -__MATHCALL (erf,, (_Mdouble_));
1027 -libm_hidden_proto(erf)
1028 -__MATHCALL (erfc,, (_Mdouble_));
1029 -libm_hidden_proto(erfc)
1030 -__MATHCALL (lgamma,, (_Mdouble_));
1031 -libm_hidden_proto(lgamma)
1032 +__MATHCALLI (erf,, (_Mdouble_));
1033 +__MATHCALLI (erfc,, (_Mdouble_));
1034 +__MATHCALLI (lgamma,, (_Mdouble_));
1035 __END_NAMESPACE_C99
1036 #endif
1038 #ifdef __USE_ISOC99
1039 __BEGIN_NAMESPACE_C99
1040 /* True gamma function. */
1041 -__MATHCALL (tgamma,, (_Mdouble_));
1042 -libm_hidden_proto(tgamma)
1043 +__MATHCALLI (tgamma,, (_Mdouble_));
1044 __END_NAMESPACE_C99
1045 #endif
1047 #if defined __USE_MISC || defined __USE_XOPEN
1048 /* Obsolete alias for `lgamma'. */
1049 __MATHCALL (gamma,, (_Mdouble_));
1050 -libm_hidden_proto(gamma)
1051 #endif
1053 #ifdef __USE_MISC
1054 @@ -326,7 +271,6 @@ libm_hidden_proto(gamma)
1055 `signgam'. The reentrant version instead takes a pointer and stores
1056 the value through it. */
1057 __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp));
1058 -libm_hidden_proto(lgamma_r)
1059 #endif
1062 @@ -334,103 +278,80 @@ libm_hidden_proto(lgamma_r)
1063 __BEGIN_NAMESPACE_C99
1064 /* Return the integer nearest X in the direction of the
1065 prevailing rounding mode. */
1066 -__MATHCALL (rint,, (_Mdouble_ __x));
1067 -libm_hidden_proto(rint)
1068 +__MATHCALLI (rint,, (_Mdouble_ __x));
1070 /* Return X + epsilon if X < Y, X - epsilon if X > Y. */
1071 __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
1072 -libm_hidden_proto(nextafter)
1073 # if defined __USE_ISOC99 && !defined __LDBL_COMPAT
1074 __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
1075 -libm_hidden_proto(nexttoward)
1076 # endif
1078 /* Return the remainder of integer divison X / Y with infinite precision. */
1079 -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
1080 -libm_hidden_proto(remainder)
1081 +__MATHCALLI (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
1083 # if defined __USE_MISC || defined __USE_ISOC99
1084 /* Return X times (2 to the Nth power). */
1085 -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
1086 -libm_hidden_proto(scalbn)
1087 +__MATHCALLI (scalbn,, (_Mdouble_ __x, int __n));
1088 # endif
1090 /* Return the binary exponent of X, which must be nonzero. */
1091 -__MATHDECL (int,ilogb,, (_Mdouble_ __x));
1092 -libm_hidden_proto(ilogb)
1093 +__MATHDECLI (int,ilogb,, (_Mdouble_ __x));
1094 #endif
1096 #ifdef __USE_ISOC99
1097 /* Return X times (2 to the Nth power). */
1098 -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n));
1099 -libm_hidden_proto(scalbln)
1100 +__MATHCALLI (scalbln,, (_Mdouble_ __x, long int __n));
1102 /* Round X to integral value in floating-point format using current
1103 rounding direction, but do not raise inexact exception. */
1104 -__MATHCALL (nearbyint,, (_Mdouble_ __x));
1105 -libm_hidden_proto(nearbyint)
1106 +__MATHCALLI (nearbyint,, (_Mdouble_ __x));
1108 /* Round X to nearest integral value, rounding halfway cases away from
1109 zero. */
1110 __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
1111 -libm_hidden_proto(round)
1113 /* Round X to the integral value in floating-point format nearest but
1114 not larger in magnitude. */
1115 __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__));
1116 -libm_hidden_proto(trunc)
1118 /* Compute remainder of X and Y and put in *QUO a value with sign of x/y
1119 and magnitude congruent `mod 2^n' to the magnitude of the integral
1120 quotient x/y, with n >= 3. */
1121 -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo));
1122 -libm_hidden_proto(remquo)
1123 +__MATHCALLI (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo));
1126 /* Conversion functions. */
1128 /* Round X to nearest integral value according to current rounding
1129 direction. */
1130 -__MATHDECL (long int,lrint,, (_Mdouble_ __x));
1131 -libm_hidden_proto(lrint)
1132 -__MATHDECL (long long int,llrint,, (_Mdouble_ __x));
1133 -libm_hidden_proto(llrint)
1134 +__MATHDECLI (long int,lrint,, (_Mdouble_ __x));
1135 +__MATHDECLI (long long int,llrint,, (_Mdouble_ __x));
1137 /* Round X to nearest integral value, rounding halfway cases away from
1138 zero. */
1139 -__MATHDECL (long int,lround,, (_Mdouble_ __x));
1140 -libm_hidden_proto(lround)
1141 -__MATHDECL (long long int,llround,, (_Mdouble_ __x));
1142 -libm_hidden_proto(llround)
1143 +__MATHDECLI (long int,lround,, (_Mdouble_ __x));
1144 +__MATHDECLI (long long int,llround,, (_Mdouble_ __x));
1147 /* Return positive difference between X and Y. */
1148 -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
1149 -libm_hidden_proto(fdim)
1150 +__MATHCALLI (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
1152 /* Return maximum numeric value from X and Y. */
1153 -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
1154 -libm_hidden_proto(fmax)
1155 +__MATHCALLI (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
1157 /* Return minimum numeric value from X and Y. */
1158 -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y));
1159 -libm_hidden_proto(fmin)
1160 +__MATHCALLI (fmin,, (_Mdouble_ __x, _Mdouble_ __y));
1163 /* Classify given number. */
1164 -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
1165 - __attribute__ ((__const__));
1166 -libm_hidden_proto(__fpclassify)
1167 +__MATHDECL_PRIV (int, fpclassify,, (_Mdouble_ __value), (__const__));
1169 /* Test for negative number. */
1170 -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
1171 - __attribute__ ((__const__));
1172 -libm_hidden_proto(__signbit)
1173 +__MATHDECL_PRIV (int, signbit,, (_Mdouble_ __value), (__const__));
1176 /* Multiply-add function computed as a ternary operation. */
1177 -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
1178 -libm_hidden_proto(fma)
1179 +__MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
1180 #endif /* Use ISO C99. */
1182 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
1183 @@ -440,5 +361,4 @@ __END_NAMESPACE_C99
1184 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
1185 /* Return X times (2 to the Nth power). */
1186 __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
1187 -libm_hidden_proto(scalb)
1188 #endif