libm: floorf() missing

Cedric Hombourger chombourger at gmail.com
Mon Aug 13 09:03:58 UTC 2007


Thanks Peter. I had eventually found that DO_C99_MATH should indeed be
defined for these functions to work. Thanks also for the hint about
where the defines are magically controlled; I did not see that one ;)

Regards,
Cedric Hombourger

On 13/08/07, Peter Kjellerstedt <peter.kjellerstedt at axis.com> wrote:
>
>
> Since no one seems to have answered this I will give it a shot.
>
> The floorf() function is included in the math library if you enable
> DO_C99_MATH in the uClibc configuration.
> The L_* defines, e.g., L_floorf, are controlled by some make-magic in
> libm/Makefile.in, and used to split one C file into multiple object files.
>
> //Peter
>
>
> -----Original Message-----
> From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org] On Behalf
> Of Cedric Hombourger
> Sent: den 17 juli 2007 17:16
> To: uClibc
> Subject: libm: floorf() missing
>
>
> Hi,
>
> floorf() is apparently missing from libm. Grep'ing the source code of a
> pretty recent checkout of uClibc, I have found an implementation in
> libm/float_wrappers.c:
>
> #ifdef L_floorf
> libm_hidden_proto(floor)
> float floorf (float x)
> {
>     return (float) floor( (double)x );
> }
> #endif
>
> However L_floorf is never defined and I was wondering if it was not defined
> on purpose? Is it safe to enable this code or should we have a different
> implementation?
>
> Regards,
> Cedric Hombourger
>
>



More information about the uClibc mailing list