Re: Where's ldexpf?

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Mon, 5 Dec 2005 14:11:39 -0800
On Mon, Dec 05, 2005 at 01:32:56PM -0800, Steve Kargl wrote:
> 
> #include <stdio.h>
> #include <math.h>
> 
> int main(void) {
> 	float x;
> 	x = ldexpf(2., 2);
> 	printf("%e\n", x);
> 	return 0;
> }
> 
> cc -o z ldexpf.c -lm
> /mnt1/sgk/tmp/ccoP164Y.o(.text+0x16): In function `main':
> undefined reference to `ldexpf'
> 
> Perhpas, we need a weak reference.
> 
> --- /usr/src/lib/msun/src/e_scalbf.c.orig       Mon Dec  5 13:29:47 2005
> +++ /usr/src/lib/msun/src/e_scalbf.c    Mon Dec  5 13:28:53 2005
> _at__at_ -42,3 +42,5 _at__at_
>         return scalbnf(x,(int)fn);
>  #endif
>  }
> +
> +__weak_reference(scalbf, ldexpf);
> 

Can someone commit the above patch?  It is needed for all non-i386
architectures.

-- 
Steve
Received on Mon Dec 05 2005 - 21:11:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:48 UTC