svn commit: r209110 - in head/lib/msun: . src
Kostik Belousov
kostikbel at gmail.com
Fri Dec 3 00:54:22 UTC 2010
On Thu, Dec 02, 2010 at 02:00:10PM -0500, David Schultz wrote:
> On Thu, Dec 02, 2010, Kostik Belousov wrote:
> > For __isnanf, libc exports __isnanf at FBSD_1.0, and libm exports
> > __isnanf at FBSD_1.2. I suspect that we could export both
> > __isnanf at FBSD_1.0 and __isnanf at FBSD_1.2 from libc.
>
> I like the idea of adding an __isnanf at FBSD_1.2 alias to libc for
> the benefit of people running -CURRENT.
Ok, draft of the change is below, I am not sure is it worth the churn.
I was unable to make the ld support two versions of the same symbol.
lib/msun would benefit from elimination of isnan sources if this is
committed.
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index d55bc46..f7c722e 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -19,8 +19,8 @@ SRCS+= __getosreldate.c __xuname.c \
getosreldate.c getpagesize.c getpagesizes.c \
getpeereid.c getprogname.c getpwent.c getttyent.c \
getusershell.c getutxent.c getvfsbyname.c glob.c \
- initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \
- lockf.c lrand48.c mrand48.c nftw.c nice.c \
+ initgroups.c isatty.c isinf.c isnan.c isnan_compat.c jrand48.c \
+ lcong48.c lockf.c lrand48.c mrand48.c nftw.c nice.c \
nlist.c nrand48.c opendir.c \
pause.c pmadvise.c popen.c posix_spawn.c \
psignal.c pututxline.c pw_scan.c pwcache.c \
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index f9abab5..fd0a896 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -200,7 +200,6 @@ FBSD_1.0 {
getvfsbyname;
__isnan;
isnan;
- __isnanf;
isnanf;
__isinf;
isinf;
@@ -378,6 +377,7 @@ FBSD_1.2 {
sem_wait;
setutxdb;
setutxent;
+ __isnanf;
};
FBSDprivate_1.0 {
diff --git a/lib/libc/gen/isnan_compat.c b/lib/libc/gen/isnan_compat.c
new file mode 100644
index 0000000..f4749eb
--- /dev/null
+++ b/lib/libc/gen/isnan_compat.c
@@ -0,0 +1,17 @@
+/*
+ * The file is in public domain.
+ * Written by Konstantin Belousov <kib at FreeBSD.org>
+ *
+ * $FreeBSD$
+ */
+
+#include <math.h>
+
+__sym_compat(__isnanf, __isnanf_compat, FBSD_1.0);
+
+int
+__isnanf_compat(float f)
+{
+
+ return (__isnanf(f));
+}
diff --git a/lib/msun/Symbol.map b/lib/msun/Symbol.map
index 429a76f..8b33dca 100644
--- a/lib/msun/Symbol.map
+++ b/lib/msun/Symbol.map
@@ -118,7 +118,6 @@ FBSD_1.0 {
__isfinite;
__isfinitef;
__isfinitel;
- isnanf;
__isnanl;
__isnormal;
__isnormalf;
@@ -221,5 +220,4 @@ FBSD_1.1 {
/* First added in 9.0-CURRENT */
FBSD_1.2 {
- __isnanf;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20101203/ddbf621c/attachment.pgp
More information about the svn-src-head
mailing list