[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *printf: support the ' flag
From: |
Bruno Haible |
Subject: |
Re: *printf: support the ' flag |
Date: |
Mon, 7 May 2007 01:17:23 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> Cygwin 2006 (aka cygwin 1.5.19) # # # . . # . . . . .
> Cygwin 2007 (aka cygwin 1.5.24) . # # . . . . . . . .
Thanks for this info. I'm applying the appended patch.
> Cygwin 1.7.0 (not yet released) . ? . . . . . . . . .
In general I prefer to wait for the release.
> Another cygwin bug that will be fixed in 1.7.0, but that
> might still occur on other platforms with BSD code base:
> printf("%#3.f", 0.1) used to result in " 0" instead of the correct " 0.".
Interesting. I added a test for a similar case to the testsuite now.
Bruno
2007-05-06 Bruno Haible <address@hidden>
* m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
Update with info about Cygwin.
* doc/functions/fprintf.texi: Update.
* doc/functions/printf.texi: Update.
* doc/functions/snprintf.texi: Update.
* doc/functions/sprintf.texi: Update.
* doc/functions/vfprintf.texi: Update.
* doc/functions/vprintf.texi: Update.
* doc/functions/vsnprintf.texi: Update.
* doc/functions/vsprintf.texi: Update.
Reported by Eric Blake.
--- m4/printf.m4 6 May 2007 23:02:10 -0000 1.23
+++ m4/printf.m4 6 May 2007 23:13:16 -0000
@@ -309,6 +309,7 @@
[
changequote(,)dnl
case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
*) gl_cv_func_printf_flag_grouping="guessing yes";;
@@ -632,6 +633,8 @@
# Guess yes on MacOS X >= 10.3.
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
# Guess yes on Solaris >= 2.6.
solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
@@ -692,8 +695,8 @@
dnl FreeBSD 5.4, 6.1 . ? . . . . # . . . . .
dnl MacOS X 10.3.9 . # . . . . # . . . . .
dnl OpenBSD 3.9, 4.0 . # ? . . ? ? . . . ? ?
-dnl Cygwin 2007 . # # . . ? ? . . . . ?
-dnl Cygwin 2006 # # # . . ? ? . . . . ?
+dnl Cygwin 2007 (= Cygwin 1.5.24) . # # . . . ? . . . . .
+dnl Cygwin 2006 (= Cygwin 1.5.19) # # # . . # ? . . . . .
dnl Solaris 10 . # . . . . # . . . . .
dnl Solaris 2.6 ... 9 # # # . . . # . . . . .
dnl Solaris 2.5.1 # # # . . . # # # # # #
--- doc/functions/fprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/fprintf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/printf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/printf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/snprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/snprintf.texi 6 May 2007 23:13:16 -0000
@@ -32,7 +32,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/sprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/sprintf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/vfprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/vfprintf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/vprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/vprintf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/vsnprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/vsnprintf.texi 6 May 2007 23:13:16 -0000
@@ -32,7 +32,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms:
--- doc/functions/vsprintf.texi 6 May 2007 23:02:10 -0000 1.3
+++ doc/functions/vsprintf.texi 6 May 2007 23:13:16 -0000
@@ -25,7 +25,7 @@
NetBSD 3.0, mingw, BeOS.
@item
This function doesn't support the @code{'} flag on some platforms:
-NetBSD 3.0, mingw.
+NetBSD 3.0, Cygwin 2006, mingw.
@item
printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
with zeroes) on some platforms: