Bug#244610: libc6-dev: No header file declares log2l().
On Wed, Apr 21, 2004 at 02:17:01AM +0100, ryutaroh@it.ss.titech.ac.jp wrote:
> > Read /usr/include/bits/mathcalls.h.
>
> Have you compiled a sample code with log2l() and <math.h>
> and checked whether a warning was displayed? I doubt it.
>
> Could you compile the following code with "gcc -Wall"?
>
> #include <math.h>
>
> int main(void)
> {
> long double a=0.1;
> return (int) log2l(a);
> }
>
> I got the following warning, which should not happen according
> to the manual page.
>
> sh-2.05b$ gcc -Wall log2l.c -lm
> log2l.c: In function `main':
> log2l.c:6: warning: implicit declaration of function `log2l'
Have you read /usr/include/bits/mathcalls.h as GOTO-san suggested? I
doubt it :)
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Compute base-2 exponential of X. */
__MATHCALL (exp2,, (_Mdouble_ __x));
/* Compute base-2 logarithm of X. */
__MATHCALL (log2,, (_Mdouble_ __x));
__END_NAMESPACE_C99
#endif
If you compile with -std=c99, the prototype will be visible.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: