Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2005 13:32:56 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        freebsd-current@freebsd.org
Subject:   Where's ldexpf?
Message-ID:  <20051205213255.GA21943@troutmask.apl.washington.edu>

next in thread | raw e-mail | index | archive | help

#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
@@ -42,3 +42,5 @@
        return scalbnf(x,(int)fn);
 #endif
 }
+
+__weak_reference(scalbf, ldexpf);


-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051205213255.GA21943>