diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-15 01:03:13 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-15 01:03:13 +0400 |
commit | 1012585f1f94b4674a8370e4c1f3300a064da860 (patch) | |
tree | 3d6970723a8cbb0e04b70abdca03697b1bf359a2 | |
parent | e9154015a09ac328f94c126e3253c9ebcff7b004 (diff) |
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.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 10 |
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; } |