Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in
libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, but not in libm.so. This makes it possible to statically link executables using both isnan and isnanf with libc and libm. Tested by: kargl MFC after: 1 week
This commit is contained in:
parent
1750b7b9c8
commit
0779690c2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242879
@ -35,6 +35,7 @@
|
|||||||
* binary compat until we can bump libm's major version number.
|
* binary compat until we can bump libm's major version number.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PIC
|
||||||
__weak_reference(__isnan, isnan);
|
__weak_reference(__isnan, isnan);
|
||||||
__weak_reference(__isnanf, isnanf);
|
__weak_reference(__isnanf, isnanf);
|
||||||
|
|
||||||
@ -55,3 +56,4 @@ __isnanf(float f)
|
|||||||
u.f = f;
|
u.f = f;
|
||||||
return (u.bits.exp == 255 && u.bits.man != 0);
|
return (u.bits.exp == 255 && u.bits.man != 0);
|
||||||
}
|
}
|
||||||
|
#endif /* PIC */
|
||||||
|
@ -30,8 +30,9 @@
|
|||||||
|
|
||||||
#include "fpmath.h"
|
#include "fpmath.h"
|
||||||
|
|
||||||
/* Provided by libc */
|
/* Provided by libc.so */
|
||||||
#if 0
|
#ifndef PIC
|
||||||
|
#undef isnan
|
||||||
int
|
int
|
||||||
isnan(double d)
|
isnan(double d)
|
||||||
{
|
{
|
||||||
@ -40,7 +41,7 @@ isnan(double d)
|
|||||||
u.d = d;
|
u.d = d;
|
||||||
return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
|
return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !PIC */
|
||||||
|
|
||||||
int
|
int
|
||||||
__isnanf(float f)
|
__isnanf(float f)
|
||||||
|
Loading…
Reference in New Issue
Block a user