[uClibc] __isnanl and __isinfl #ifdefed out?

Rob Landley rob at landley.net
Mon Nov 29 05:00:42 UTC 2004


On Sunday 28 November 2004 11:41 pm, Manuel Novoa III wrote:

> > Glad to be of service.  I'd happily fix it if I had the foggiest idea why
> > the #if 0 was in there in the first place.  (Was it chopped out because
> > it doesn't work?  Because it took up too much space?  Should it be
> > #if CONFIG_DO_C99_MATH instead of #if 0?  Shouldn't strtold() be chopped
> > out also if long double support is missing?)
>
> Not all long double support is missing.  In fact, I don't think any long
> double support is currently missing in the libc itself.  Certainly
> strtold() is implemented.  But libm is missing most of the long double
> funcs, as well as float funcs and complex funcs.
>
> I'm in the middle of rewriting libm.  But haven't been able to look at
> it in a couple of weeks because of the move and the new job.

Hmmm...  It's not actually long double that's causing the problem.  It's 
isnan() and isinf().  They're only in the library if you include full C99 
header support, but they're there in the headers always.

I just rewrote busybox sort to have an option for full SuSv3 support (still 
tweaking but I posted V1 of the rewrite to the busybox list yesterday), and 
one of the things this adds if you enable it is floating point support to -n.

I made long double support go away (apparently I misread the gnu sort info 
page for -g, which says strtod instead of strtold), but now the linker's 
complaining it can't find __isnan and __isinf (yeah, big improvement).  And 
those it _does_ need...

I'm going to audit the DO_C99_MATH config symbol and produce a patch to make 
the header files match the makefile.

By the way, you don't audit header files, you audit config symbols.  And I'd 
suggest changing each config symbol to have the CONFIG_ prefix along the way 
(the way the linux kernel does) to show that it's been audited...

Off to thump on header files...

> Manuel

Rob



More information about the uClibc mailing list