Dash:
[t2.git] / package / base / dietlibc / libm-i386.patch
blob3d84bc598165cb69ffa377ff6e69a0c5c5b997c4
1 diff -ur dietlibc-0.30/libm/fpmacros.c dietlibc-0.30-libm-i386/libm/fpmacros.c
2 --- dietlibc-0.30/libm/fpmacros.c 2006-06-28 20:15:02.000000000 +0200
3 +++ dietlibc-0.30-libm-i386/libm/fpmacros.c 2006-06-28 19:51:31.000000000 +0200
4 @@ -20,6 +20,8 @@
5 **
6 ***********************************************************************/
8 +#if ! defined (__i386__) && ! defined (__x86_64__)
10 #include <features.h>
11 #define _GNU_SOURCE
12 #include <sys/types.h>
13 @@ -289,3 +291,4 @@
14 weak_alias (__isnanl, isnanl);
15 #endif
17 +#endif
18 diff -ur dietlibc-0.30/libm/s_asinh.c dietlibc-0.30-libm-i386/libm/s_asinh.c
19 --- dietlibc-0.30/libm/s_asinh.c 2006-06-28 20:15:02.000000000 +0200
20 +++ dietlibc-0.30-libm-i386/libm/s_asinh.c 2006-06-28 20:03:38.000000000 +0200
21 @@ -38,9 +38,9 @@
22 huge= 1.00000000000000000000e+300;
24 #ifdef __STDC__
25 - double asinh(double x)
26 + double __asinh(double x)
27 #else
28 - double asinh(x)
29 + double __asinh(x)
30 double x;
31 #endif
33 @@ -63,3 +63,4 @@
35 if(hx>0) return w; else return -w;
37 +weak_alias (__asinh, asinh)
38 diff -ur dietlibc-0.30/libm/s_atan.c dietlibc-0.30-libm-i386/libm/s_atan.c
39 --- dietlibc-0.30/libm/s_atan.c 2006-06-28 20:15:02.000000000 +0200
40 +++ dietlibc-0.30-libm-i386/libm/s_atan.c 2006-06-28 20:10:26.000000000 +0200
41 @@ -86,9 +86,9 @@
42 huge = 1.0e300;
44 #ifdef __STDC__
45 - double atan(double x)
46 + double __atan(double x)
47 #else
48 - double atan(x)
49 + double __atan(x)
50 double x;
51 #endif
53 @@ -137,3 +137,4 @@
54 return (hx<0)? -z:z;
57 +weak_alias (__atan, atan)
58 diff -ur dietlibc-0.30/libm/s_cbrt.c dietlibc-0.30-libm-i386/libm/s_cbrt.c
59 --- dietlibc-0.30/libm/s_cbrt.c 2006-06-28 20:15:02.000000000 +0200
60 +++ dietlibc-0.30-libm-i386/libm/s_cbrt.c 2006-06-28 20:05:18.000000000 +0200
61 @@ -40,9 +40,9 @@
62 G = 3.57142857142857150787e-01; /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */
64 #ifdef __STDC__
65 - double cbrt(double x)
66 + double __cbrt(double x)
67 #else
68 - double cbrt(x)
69 + double __cbrt(x)
70 double x;
71 #endif
73 @@ -91,3 +91,4 @@
74 SET_HIGH_WORD(t,high|sign);
75 return(t);
77 +weak_alias (__cbrt, cbrt)
78 diff -ur dietlibc-0.30/libm/s_copysign.c dietlibc-0.30-libm-i386/libm/s_copysign.c
79 --- dietlibc-0.30/libm/s_copysign.c 2006-06-28 20:15:02.000000000 +0200
80 +++ dietlibc-0.30-libm-i386/libm/s_copysign.c 2006-06-28 20:01:55.000000000 +0200
81 @@ -24,9 +24,9 @@
82 #include "math_private.h"
84 #ifdef __STDC__
85 - double copysign(double x, double y)
86 + double __copysign(double x, double y)
87 #else
88 - double copysign(x,y)
89 + double __copysign(x,y)
90 double x,y;
91 #endif
93 @@ -36,4 +36,4 @@
94 SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
95 return x;
98 +weak_alias(__copysign, copysign)
99 diff -ur dietlibc-0.30/libm/s_cos.c dietlibc-0.30-libm-i386/libm/s_cos.c
100 --- dietlibc-0.30/libm/s_cos.c 2006-06-28 20:15:02.000000000 +0200
101 +++ dietlibc-0.30-libm-i386/libm/s_cos.c 2006-06-28 20:10:03.000000000 +0200
102 @@ -49,9 +49,9 @@
103 #include "math_private.h"
105 #ifdef __STDC__
106 - double cos(double x)
107 + double __cos(double x)
108 #else
109 - double cos(x)
110 + double __cos(x)
111 double x;
112 #endif
114 @@ -80,3 +80,4 @@
118 +weak_alias (__cos, cos)
119 diff -ur dietlibc-0.30/libm/s_expm1.c dietlibc-0.30-libm-i386/libm/s_expm1.c
120 --- dietlibc-0.30/libm/s_expm1.c 2006-06-28 20:15:02.000000000 +0200
121 +++ dietlibc-0.30-libm-i386/libm/s_expm1.c 2006-06-28 20:04:13.000000000 +0200
122 @@ -132,9 +132,9 @@
123 Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
125 #ifdef __STDC__
126 - double expm1(double x)
127 + double __expm1(double x)
128 #else
129 - double expm1(x)
130 + double __expm1(x)
131 double x;
132 #endif
134 @@ -227,3 +227,4 @@
136 return y;
138 +weak_alias (__expm1, expm1)
139 diff -ur dietlibc-0.30/libm/s_fabs.c dietlibc-0.30-libm-i386/libm/s_fabs.c
140 --- dietlibc-0.30/libm/s_fabs.c 2006-06-28 20:15:02.000000000 +0200
141 +++ dietlibc-0.30-libm-i386/libm/s_fabs.c 2006-06-28 20:09:37.000000000 +0200
142 @@ -22,9 +22,9 @@
143 #include "math_private.h"
145 #ifdef __STDC__
146 - double fabs(double x)
147 + double __fabs(double x)
148 #else
149 - double fabs(x)
150 + double __fabs(x)
151 double x;
152 #endif
154 @@ -33,3 +33,4 @@
155 SET_HIGH_WORD(x,high&0x7fffffff);
156 return x;
158 +weak_alias (__fabs, fabs)
159 diff -ur dietlibc-0.30/libm/s_floor.c dietlibc-0.30-libm-i386/libm/s_floor.c
160 --- dietlibc-0.30/libm/s_floor.c 2006-06-28 20:15:02.000000000 +0200
161 +++ dietlibc-0.30-libm-i386/libm/s_floor.c 2006-06-28 20:09:19.000000000 +0200
162 @@ -33,9 +33,9 @@
163 #endif
165 #ifdef __STDC__
166 - double floor(double x)
167 + double __floor(double x)
168 #else
169 - double floor(x)
170 + double __floor(x)
171 double x;
172 #endif
174 @@ -79,3 +79,4 @@
175 INSERT_WORDS(x,i0,i1);
176 return x;
178 +weak_alias (__floor, floor)
179 diff -ur dietlibc-0.30/libm/s_ilogb.c dietlibc-0.30-libm-i386/libm/s_ilogb.c
180 --- dietlibc-0.30/libm/s_ilogb.c 2006-06-28 20:15:02.000000000 +0200
181 +++ dietlibc-0.30-libm-i386/libm/s_ilogb.c 2006-06-28 19:58:36.000000000 +0200
182 @@ -24,9 +24,9 @@
183 #include "math_private.h"
185 #ifdef __STDC__
186 - int ilogb(double x)
187 + int __ilogb(double x)
188 #else
189 - int ilogb(x)
190 + int __ilogb(x)
191 double x;
192 #endif
194 @@ -49,3 +49,4 @@
195 else if (hx<0x7ff00000) return (hx>>20)-1023;
196 else return 0x7fffffff;
198 +weak_alias (__ilogb, ilogb)
199 diff -ur dietlibc-0.30/libm/s_ldexp.c dietlibc-0.30-libm-i386/libm/s_ldexp.c
200 --- dietlibc-0.30/libm/s_ldexp.c 2006-06-28 20:15:02.000000000 +0200
201 +++ dietlibc-0.30-libm-i386/libm/s_ldexp.c 2006-06-28 20:06:45.000000000 +0200
202 @@ -19,9 +19,9 @@
203 #include <errno.h>
205 #ifdef __STDC__
206 - double ldexp(double value, int exp)
207 + double __ldexp(double value, int exp)
208 #else
209 - double ldexp(value, exp)
210 + double __ldexp(value, exp)
211 double value; int exp;
212 #endif
214 @@ -30,3 +30,4 @@
215 if(!finite(value)||value==0.0) errno = ERANGE;
216 return value;
218 +weak_alias (__ldexp, ldexp)
219 diff -ur dietlibc-0.30/libm/s_log1p.c dietlibc-0.30-libm-i386/libm/s_log1p.c
220 --- dietlibc-0.30/libm/s_log1p.c 2006-06-28 20:15:02.000000000 +0200
221 +++ dietlibc-0.30-libm-i386/libm/s_log1p.c 2006-06-28 20:06:16.000000000 +0200
222 @@ -105,9 +105,9 @@
223 #endif
225 #ifdef __STDC__
226 - double log1p(double x)
227 + double __log1p(double x)
228 #else
229 - double log1p(x)
230 + double __log1p(x)
231 double x;
232 #endif
234 @@ -172,3 +172,4 @@
235 if(k==0) return f-(hfsq-s*(hfsq+R)); else
236 return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
238 +weak_alias (__log1p, log1p)
239 diff -ur dietlibc-0.30/libm/s_logb.c dietlibc-0.30-libm-i386/libm/s_logb.c
240 --- dietlibc-0.30/libm/s_logb.c 2006-06-28 20:15:02.000000000 +0200
241 +++ dietlibc-0.30-libm-i386/libm/s_logb.c 2006-06-28 19:59:16.000000000 +0200
242 @@ -24,9 +24,9 @@
243 #include "math_private.h"
245 #ifdef __STDC__
246 - double logb(double x)
247 + double __logb(double x)
248 #else
249 - double logb(x)
250 + double __logb(x)
251 double x;
252 #endif
254 @@ -40,3 +40,4 @@
255 else
256 return (double) (ix-1023);
258 +weak_alias (__logb, logb)
259 diff -ur dietlibc-0.30/libm/s_sin.c dietlibc-0.30-libm-i386/libm/s_sin.c
260 --- dietlibc-0.30/libm/s_sin.c 2006-06-28 20:15:02.000000000 +0200
261 +++ dietlibc-0.30-libm-i386/libm/s_sin.c 2006-06-28 20:07:36.000000000 +0200
262 @@ -49,9 +49,9 @@
263 #include "math_private.h"
265 #ifdef __STDC__
266 - double sin(double x)
267 + double __sin(double x)
268 #else
269 - double sin(x)
270 + double __sin(x)
271 double x;
272 #endif
274 @@ -80,3 +80,4 @@
278 +weak_alias (__sin, sin)
279 diff -ur dietlibc-0.30/libm/s_tan.c dietlibc-0.30-libm-i386/libm/s_tan.c
280 --- dietlibc-0.30/libm/s_tan.c 2006-06-28 20:15:02.000000000 +0200
281 +++ dietlibc-0.30-libm-i386/libm/s_tan.c 2006-06-28 19:57:55.000000000 +0200
282 @@ -48,9 +48,9 @@
283 #include "math_private.h"
285 #ifdef __STDC__
286 - double tan(double x)
287 + double __tan(double x)
288 #else
289 - double tan(x)
290 + double __tan(x)
291 double x;
292 #endif
294 @@ -74,3 +74,4 @@
295 -1 -- n odd */
298 +weak_alias (__tan, tan)
299 diff -ur dietlibc-0.30/libm/w_acos.c dietlibc-0.30-libm-i386/libm/w_acos.c
300 --- dietlibc-0.30/libm/w_acos.c 2006-06-28 20:15:02.000000000 +0200
301 +++ dietlibc-0.30-libm-i386/libm/w_acos.c 2006-06-28 20:10:58.000000000 +0200
302 @@ -23,9 +23,9 @@
305 #ifdef __STDC__
306 - double acos(double x) /* wrapper acos */
307 + double __acos(double x) /* wrapper acos */
308 #else
309 - double acos(x) /* wrapper acos */
310 + double __acos(x) /* wrapper acos */
311 double x;
312 #endif
314 @@ -41,3 +41,4 @@
315 return z;
316 #endif
318 +weak_alias (__acos, acos)
319 diff -ur dietlibc-0.30/libm/w_acosh.c dietlibc-0.30-libm-i386/libm/w_acosh.c
320 --- dietlibc-0.30/libm/w_acosh.c 2006-06-28 20:15:02.000000000 +0200
321 +++ dietlibc-0.30-libm-i386/libm/w_acosh.c 2006-06-28 20:02:44.000000000 +0200
322 @@ -22,9 +22,9 @@
323 #include "math_private.h"
325 #ifdef __STDC__
326 - double acosh(double x) /* wrapper acosh */
327 + double __acosh(double x) /* wrapper acosh */
328 #else
329 - double acosh(x) /* wrapper acosh */
330 + double __acosh(x) /* wrapper acosh */
331 double x;
332 #endif
334 @@ -40,3 +40,4 @@
335 return z;
336 #endif
338 +weak_alias (__acosh, acosh)
339 diff -ur dietlibc-0.30/libm/w_asin.c dietlibc-0.30-libm-i386/libm/w_asin.c
340 --- dietlibc-0.30/libm/w_asin.c 2006-06-28 20:15:02.000000000 +0200
341 +++ dietlibc-0.30-libm-i386/libm/w_asin.c 2006-06-28 20:03:08.000000000 +0200
342 @@ -24,9 +24,9 @@
345 #ifdef __STDC__
346 - double asin(double x) /* wrapper asin */
347 + double __asin(double x) /* wrapper asin */
348 #else
349 - double asin(x) /* wrapper asin */
350 + double __asin(x) /* wrapper asin */
351 double x;
352 #endif
354 @@ -42,3 +42,4 @@
355 return z;
356 #endif
358 +weak_alias (__asin, asin)
359 diff -ur dietlibc-0.30/libm/w_atan2.c dietlibc-0.30-libm-i386/libm/w_atan2.c
360 --- dietlibc-0.30/libm/w_atan2.c 2006-06-28 20:15:02.000000000 +0200
361 +++ dietlibc-0.30-libm-i386/libm/w_atan2.c 2006-06-28 19:57:11.000000000 +0200
362 @@ -22,9 +22,9 @@
365 #ifdef __STDC__
366 - double atan2(double y, double x) /* wrapper atan2 */
367 + double __atan2(double y, double x) /* wrapper atan2 */
368 #else
369 - double atan2(y,x) /* wrapper atan2 */
370 + double __atan2(y,x) /* wrapper atan2 */
371 double y,x;
372 #endif
374 @@ -40,3 +40,4 @@
375 return z;
376 #endif
378 +weak_alias (__atan2, atan2)
379 diff -ur dietlibc-0.30/libm/w_atanh.c dietlibc-0.30-libm-i386/libm/w_atanh.c
380 --- dietlibc-0.30/libm/w_atanh.c 2006-06-28 20:15:02.000000000 +0200
381 +++ dietlibc-0.30-libm-i386/libm/w_atanh.c 2006-06-28 20:02:23.000000000 +0200
382 @@ -23,9 +23,9 @@
385 #ifdef __STDC__
386 - double atanh(double x) /* wrapper atanh */
387 + double __atanh(double x) /* wrapper atanh */
388 #else
389 - double atanh(x) /* wrapper atanh */
390 + double __atanh(x) /* wrapper atanh */
391 double x;
392 #endif
394 @@ -45,3 +45,4 @@
395 return z;
396 #endif
398 +weak_alias (__atanh, atanh)
399 diff -ur dietlibc-0.30/libm/w_drem.c dietlibc-0.30-libm-i386/libm/w_drem.c
400 --- dietlibc-0.30/libm/w_drem.c 2006-06-28 20:15:02.000000000 +0200
401 +++ dietlibc-0.30-libm-i386/libm/w_drem.c 2006-06-28 20:01:26.000000000 +0200
402 @@ -6,10 +6,10 @@
405 #include <math.h>
406 +#include "math_private.h"
408 -double
409 -drem(x, y)
410 - double x, y;
411 +double __drem(double x, double y)
413 return remainder(x, y);
415 +weak_alias (__drem, drem)
416 diff -ur dietlibc-0.30/libm/w_fmod.c dietlibc-0.30-libm-i386/libm/w_fmod.c
417 --- dietlibc-0.30/libm/w_fmod.c 2006-06-28 20:15:02.000000000 +0200
418 +++ dietlibc-0.30-libm-i386/libm/w_fmod.c 2006-06-28 20:05:43.000000000 +0200
419 @@ -23,9 +23,9 @@
422 #ifdef __STDC__
423 - double fmod(double x, double y) /* wrapper fmod */
424 + double __fmod(double x, double y) /* wrapper fmod */
425 #else
426 - double fmod(x,y) /* wrapper fmod */
427 + double __fmod(x,y) /* wrapper fmod */
428 double x,y;
429 #endif
431 @@ -41,3 +41,4 @@
432 return z;
433 #endif
435 +weak_alias (__fmod, fmod)
436 diff -ur dietlibc-0.30/libm/w_hypot.c dietlibc-0.30-libm-i386/libm/w_hypot.c
437 --- dietlibc-0.30/libm/w_hypot.c 2006-06-28 20:15:02.000000000 +0200
438 +++ dietlibc-0.30-libm-i386/libm/w_hypot.c 2006-06-28 20:08:54.000000000 +0200
439 @@ -23,9 +23,9 @@
442 #ifdef __STDC__
443 - double hypot(double x, double y)/* wrapper hypot */
444 + double __hypot(double x, double y)/* wrapper hypot */
445 #else
446 - double hypot(x,y) /* wrapper hypot */
447 + double __hypot(x,y) /* wrapper hypot */
448 double x,y;
449 #endif
451 @@ -41,3 +41,4 @@
452 return z;
453 #endif
455 +weak_alias (__hypot, hypot)
456 diff -ur dietlibc-0.30/libm/w_log.c dietlibc-0.30-libm-i386/libm/w_log.c
457 --- dietlibc-0.30/libm/w_log.c 2006-06-28 20:15:02.000000000 +0200
458 +++ dietlibc-0.30-libm-i386/libm/w_log.c 2006-06-28 20:08:32.000000000 +0200
459 @@ -23,9 +23,9 @@
462 #ifdef __STDC__
463 - double log(double x) /* wrapper log */
464 + double __log(double x) /* wrapper log */
465 #else
466 - double log(x) /* wrapper log */
467 + double __log(x) /* wrapper log */
468 double x;
469 #endif
471 @@ -41,3 +41,4 @@
472 return __kernel_standard(x,x,17); /* log(x<0) */
473 #endif
475 +weak_alias (__log, log)
476 diff -ur dietlibc-0.30/libm/w_log10.c dietlibc-0.30-libm-i386/libm/w_log10.c
477 --- dietlibc-0.30/libm/w_log10.c 2006-06-28 20:15:02.000000000 +0200
478 +++ dietlibc-0.30-libm-i386/libm/w_log10.c 2006-06-28 20:08:11.000000000 +0200
479 @@ -23,9 +23,9 @@
482 #ifdef __STDC__
483 - double log10(double x) /* wrapper log10 */
484 + double __log10(double x) /* wrapper log10 */
485 #else
486 - double log10(x) /* wrapper log10 */
487 + double __log10(x) /* wrapper log10 */
488 double x;
489 #endif
491 @@ -44,3 +44,4 @@
492 return z;
493 #endif
495 +weak_alias (__log10, log10)
496 diff -ur dietlibc-0.30/libm/w_sqrt.c dietlibc-0.30-libm-i386/libm/w_sqrt.c
497 --- dietlibc-0.30/libm/w_sqrt.c 2006-06-28 20:15:02.000000000 +0200
498 +++ dietlibc-0.30-libm-i386/libm/w_sqrt.c 2006-06-28 20:07:09.000000000 +0200
499 @@ -22,9 +22,9 @@
500 #include "math_private.h"
502 #ifdef __STDC__
503 - double sqrt(double x) /* wrapper sqrt */
504 + double __sqrt(double x) /* wrapper sqrt */
505 #else
506 - double sqrt(x) /* wrapper sqrt */
507 + double __sqrt(x) /* wrapper sqrt */
508 double x;
509 #endif
511 @@ -40,3 +40,4 @@
512 return z;
513 #endif
515 +weak_alias (__sqrt, sqrt)