Why is libm needed for isnan()?
Peter S. Mazinger
ps.m at gmx.net
Mon Jan 23 23:09:25 UTC 2006
On Mon, 23 Jan 2006, Rob Landley wrote:
> A question came up about busybox sort, which builds fine under glibc in "big"
> mode but won't against uClibc.
>
> Here's a hello world example of the problem:
>
> #include <stdio.h>
> #include <math.h>
>
> int main(int argc, char *argv[])
> {
> double d=0.0;
>
> printf("%d\n",isnan(d));
>
> return 0;
> }
>
> Compiling this on ubuntu "horny hedgehog" against glibc, I can go:
>
> $ gcc hello.c
> $ ./a.out
> 0
> $ ldd a.out
> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7eaf000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7feb000)
>
> And life is good. But in the bug report I got, under uClibc isnan() requires
> libm or the build breaks. I'd rather not add a gratuitous library dependency
> that glibc doesn't need, but I'd also rather not have unnecessary explicit
> checks for uClibc not being glibc.
>
> Anyone care to venture an opinion?
>
> Rob
answered on bb list
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list