summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/vfprintf.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 78cda649d..731208ba7 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,10 @@
2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
+ "nan" processing for systems that have long double support.
+
+2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
* libc/sys/linux/sys/types.h (int8_t): Add type.
2005-10-14 Bob Wilson <bob.wilson@acm.org>
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index 1c887d5aa..6c6e023f9 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -849,12 +849,18 @@ reswitch: switch (ch) {
if (tmp == 2) {
if (_fpvalue < 0)
sign = '-';
- cp = "Inf";
+ if (ch == 'E' || ch == 'F' || ch == 'G')
+ cp = "INF";
+ else
+ cp = "inf";
size = 3;
break;
}
if (tmp == 1) {
- cp = "NaN";
+ if (ch == 'E' || ch == 'F' || ch == 'G')
+ cp = "NAN";
+ else
+ cp = "nan";
size = 3;
break;
}