This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: printf %F broken
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Dave Korn on 4/12/2007 5:04 AM:
>>> * libc/stdio/vfprintf.c (_VFPRINTF_F): Don't confuse %F with %e.
>> Missed some cases in the last patch. printf("%2$F%1$n", &i, f) was also
>> broken.
>
> Well, I hate to be a meany, but how about a nice testcase or two then? <g>
int i;
printf("%1$F%2$n",1.0,&i);
dumped core on cygwin. I don't know how to work that into the newlib
testsuite, since I didn't see any existing printf tests and am not that
familiar with deja-gnu.
For other test cases, I'm trying to get cygwin to the point that it will
work without the help of the gnulib replacement printf module (and thus
reduce the size of various GNU executables that use gnulib to overcome
libc deficiencies); which means it must pass this test suite:
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=tests/test-vasnprintf-posix.c;h=0f158e11d71186c8d40353c3f604ea3ed0ce6b65;hb=c54ba33b96609fa095d14f0ad8f5332b909fc215
See also this file with a good comparison between various *printf
implementations, around line 500 (the bottom of the file):
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/printf.m4;h=fdabf1b354454c1f40e1b21743c4e4b2dfe79d17;hb=c54ba33b96609fa095d14f0ad8f5332b909fc215
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGHt2+84KuGfSFAYARApRpAKC7NuhWoP+wRwml3nEEav6+7giwWQCgrAmM
bHuexyXILXxY005WbxfhZqM=
=P4I7
-----END PGP SIGNATURE-----