Question regarding libm

Jan-Benedict Glaw jbglaw at lug-owl.de
Fri Sep 30 19:59:17 UTC 2005


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.)

Thanks, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050930/f84ce79e/attachment-0002.pgp 


More information about the uClibc mailing list