aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/powerpc
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2003-03-12 20:30:00 +0000
committerDavid Schultz <das@FreeBSD.org>2003-03-12 20:30:00 +0000
commit6a66acb565dde6d5b0ee52eef2a631fbb09df153 (patch)
tree2227a906466b311329420d1e05832b3c4e9aef98 /lib/libc/powerpc
parent582a954b004963a562668386a33f960a9c763d37 (diff)
downloadsrc-6a66acb565dde6d5b0ee52eef2a631fbb09df153.tar.gz
src-6a66acb565dde6d5b0ee52eef2a631fbb09df153.zip
Replace our ancient dtoa/strtod implementation with the gdtoa
package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien
Notes
Notes: svn path=/head/; revision=112163
Diffstat (limited to 'lib/libc/powerpc')
-rw-r--r--lib/libc/powerpc/arith.h9
-rw-r--r--lib/libc/powerpc/stdlib/gdtoa.mk5
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/powerpc/arith.h b/lib/libc/powerpc/arith.h
new file mode 100644
index 000000000000..9f4cfe4304d0
--- /dev/null
+++ b/lib/libc/powerpc/arith.h
@@ -0,0 +1,9 @@
+/*
+ * MD header for contrib/gdtoa
+ *
+ * $FreeBSD$
+ */
+
+#define IEEE_MC68k
+#define Arith_Kind_ASL 2
+#define Double_Align
diff --git a/lib/libc/powerpc/stdlib/gdtoa.mk b/lib/libc/powerpc/stdlib/gdtoa.mk
new file mode 100644
index 000000000000..f951a8dcad6b
--- /dev/null
+++ b/lib/libc/powerpc/stdlib/gdtoa.mk
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+# Long double is quad precision
+GDTOASRCS+=strtopQ.c
+MDSRCS+=machdep_ldisQ.c