diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-14 21:03:13 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-14 21:03:13 +0000 |
commit | 1012585f1f94b4674a8370e4c1f3300a064da860 (patch) | |
tree | 3d6970723a8cbb0e04b70abdca03697b1bf359a2 /newlib/libc/stdio/vfprintf.c | |
parent | e9154015a09ac328f94c126e3253c9ebcff7b004 (diff) | |
download | cygnal-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.c | 10 |
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; } |