changeset 30141:f829d485790f

Tweak last commit.
author Bruno Haible <bruno@clisp.org>
date Thu, 18 Sep 2008 12:34:27 +0200
parents 49b384db7c01
children fbbc632506db
files ChangeLog lib/vasnprintf.c
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 17 04:58:08 2008 +0200
+++ b/ChangeLog	Thu Sep 18 12:34:27 2008 +0200
@@ -1,3 +1,11 @@
+2008-09-18  Bruno Haible  <bruno@clisp.org>
+
+	* lib/vasnprintf.c (decimal_point_char): Define also if
+	NEED_PRINTF_INFINITE_LONG_DOUBLE.
+	(VASNPRINTF): When printing ±0.0L in NEED_PRINTF_INFINITE_LONG_DOUBLE
+	case with 'e' format, always use two digits for the exponent.
+	Reported by Jim Meyering.
+
 2008-09-16  Bruno Haible  <bruno@clisp.org>
 	and Eric Blake  <ebb9@byu.net>
 
--- a/lib/vasnprintf.c	Wed Sep 17 04:58:08 2008 +0200
+++ b/lib/vasnprintf.c	Thu Sep 18 12:34:27 2008 +0200
@@ -215,7 +215,7 @@
 #undef remainder
 #define remainder rem
 
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
 /* Determine the decimal-point character according to the current locale.  */
 # ifndef decimal_point_char_defined
 #  define decimal_point_char_defined 1
@@ -3167,11 +3167,6 @@
 				  }
 				*p++ = dp->conversion; /* 'e' or 'E' */
 				*p++ = '+';
-				/* Produce the same number of exponent digits as
-				   the native printf implementation.  */
-#   if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-				*p++ = '0';
-#   endif
 				*p++ = '0';
 				*p++ = '0';
 			      }