Question regarding libm

Manuel Novoa III mjn3 at codepoet.org
Sat Oct 1 03:24:16 UTC 2005


On Fri, Sep 30, 2005 at 09:59:17PM +0200, Jan-Benedict Glaw wrote:
> On Fri, 2005-09-30 11:07:05 +0200, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> > On Fri, 2005-09-30 08:32:51 +0200, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> > diff -Nurp src-uclibc-fresh/extra/Configs/Config.in.arch src-uclibc-hacked/extra/Configs/Config.in.arch
> > --- src-uclibc-fresh/extra/Configs/Config.in.arch	2005-06-05 18:39:50.000000000 +0200
> > +++ src-uclibc-hacked/extra/Configs/Config.in.arch	2005-09-30 10:14:36.000000000 +0200
> > @@ -40,13 +40,24 @@ config UCLIBC_HAS_FLOATS
> >  	help
> >  	  This option allows you to entirely omit all floating point number
> >  	  support from uClibc.  This will cause floating point functions like
> > -	  strtod() to be omitted from uClibc.  Other floating point functions, 
> > -	  such as printf() and scanf() will still be included in the library, 
> > +	  strtod() to be omitted from uClibc.  Other floating point functions,
> > +	  such as printf() and scanf() will still be included in the library,
> >  	  but will not contain support for floating point numbers.
> >  
> >  	  Answering N to this option can reduce the size of uClibc.  Most people
> >  	  will answer Y.
> >  
> > +config TARGET_HAS_NEGATIVE_ZERO_FLOATS
> > +	bool "    Target CPU differs between +0 and -0"
> > +	default y
> > +	depends on UCLIBC_HAS_FLOATS
> > +	help
> > +	  If your target CPU can differ +0 and -0 (IEEE floating point
> > +	  support works that way), then you should enable this option.
> > +
> > +	  Most people will answer Y, because nearly all CPUs do use IEEE
> > +	  floating point support.
> > +
> >  config HAS_FPU
> >  	bool "Target CPU has a floating point unit (FPU)"
> >  	depends on UCLIBC_HAS_FLOATS
> > diff -Nurp src-uclibc-fresh/libc/stdio/_fpmaxtostr.c src-uclibc-hacked/libc/stdio/_fpmaxtostr.c
> > --- src-uclibc-fresh/libc/stdio/_fpmaxtostr.c	2005-07-30 22:29:22.000000000 +0200
> > +++ src-uclibc-hacked/libc/stdio/_fpmaxtostr.c	2005-09-30 10:20:42.000000000 +0200
> > @@ -275,7 +275,7 @@ ssize_t _fpmaxtostr(FILE * fp, __fpmax_t
> >  	}
> >  
> >  	if (x == 0) {				/* Handle 0 now to avoid false positive. */
> > -#if 1
> > +#ifdef __TARGET_HAS_NEGATIVE_ZERO_FLOATS__
> >  		if (zeroisnegative(x)) { /* Handle 'signed' zero. */
> >  			*sign_str = '-';
> >  		}
> 
> Please comment on the patch (I've only left the interesting part above
> and snipped all whitespace differences.)

I don't have any problem with something like this.

Manuel


More information about the uClibc mailing list