aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-12-08 00:27:39 +0000
committerJeff Johnston <jjohnstn@redhat.com>2000-12-08 00:27:39 +0000
commitb294082c46c76cb7d410d38fb940ce9da20af189 (patch)
tree15e14585a7959b134668b33fa1f8cef2214b66dc
parentaa0722760b12fafcf2827c0e5cc51972233da141 (diff)
downloadnewlib-b294082c46c76cb7d410d38fb940ce9da20af189.zip
newlib-b294082c46c76cb7d410d38fb940ce9da20af189.tar.gz
newlib-b294082c46c76cb7d410d38fb940ce9da20af189.tar.bz2
2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
* libc/stdio/vfprintf.c: Minor modification to avoid requiring a floating point register unless really printing a floating point number.
-rw-r--r--newlib/ChangeLog6
-rw-r--r--newlib/libc/stdio/vfprintf.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 5f570e7..aa25263 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,9 @@
+2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
+
+ * libc/stdio/vfprintf.c: Minor modification to avoid requiring
+ a floating point register unless really printing a floating
+ point number.
+
2000-12-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/ldtoa.c: Removed include of alloca.h.
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index ea45846..306644a 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -317,9 +317,11 @@ _DEFUN (_VFPRINTF_R, (data, fp, fmt0, ap),
char *decimal_point = localeconv()->decimal_point;
char softsign; /* temporary negative sign for floats */
#ifdef _NO_LONGDBL
- double _fpvalue; /* floating point arguments %[eEfgG] */
+ union { int i; double d; } _double_ = {0};
+ #define _fpvalue (_double_.d)
#else
- _LONG_DOUBLE _fpvalue; /* floating point arguments %[eEfgG] */
+ union { int i; _LONG_DOUBLE ld; } _long_double_ = {0};
+ #define _fpvalue (_long_double_.ld)
#endif
int expt; /* integer value of exponent */
int expsize = 0; /* character count for expstr */