summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/vfprintf.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-10-14 21:03:13 +0000
committerJeff Johnston <jjohnstn@redhat.com>2005-10-14 21:03:13 +0000
commit1012585f1f94b4674a8370e4c1f3300a064da860 (patch)
tree3d6970723a8cbb0e04b70abdca03697b1bf359a2 /newlib/libc/stdio/vfprintf.c
parente9154015a09ac328f94c126e3253c9ebcff7b004 (diff)
downloadcygnal-1012585f1f94b4674a8370e4c1f3300a064da860.tar.gz
cygnal-1012585f1f94b4674a8370e4c1f3300a064da860.tar.bz2
cygnal-1012585f1f94b4674a8370e4c1f3300a064da860.zip
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.
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r--newlib/libc/stdio/vfprintf.c10
1 files changed, 8 insertions, 2 deletions
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;
}