annotate src/mingw-w64-3-fix-g-format.patch @ 3872:d7b2bb282421

mingw-w64: patch mingw-w64 for %g bug * dist-files.mk: add mingw-w64-3-fix-g-format.patch * src/mingw-w64-3-fix-g-format.patch: new file * src/build-gcc.mk: apply patches to mingw-w64 before building crt
author John Donoghue
date Mon, 06 Apr 2015 11:30:00 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3872
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
1 From: John Donoghue <john.david.donoghue@gmail.com>
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
2 Date: Mon, 6 Apr 2015 09:29:43 -0400
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
3 Subject: [PATCH] Fix printf("%g") width format out by one in some instances
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
4 (Bug 362)
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
5
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
6 * mingw-w64-crt\stdio\mingw_pformat.c
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
7 (__pformat_emit_float): change width > len => width >= len
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
8
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
9 diff -ur mingw-w64-v3.3.0.orig/mingw-w64-crt/stdio/mingw_pformat.c mingw-w64-v3.3.0/mingw-w64-crt/stdio/mingw_pformat.c
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
10 --- mingw-w64-v3.3.0.orig/mingw-w64-crt/stdio/mingw_pformat.c 2015-04-06 10:12:45.486721000 -0400
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
11 +++ mingw-w64-v3.3.0/mingw-w64-crt/stdio/mingw_pformat.c 2015-04-06 10:14:26.200702676 -0400
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
12 @@ -1055,7 +1055,7 @@
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
13 * reserve space in the output field, for the required number of
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
14 * decimal digits to be placed before the decimal point...
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
15 */
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
16 - if( stream->width > len )
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
17 + if( stream->width >= len )
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
18 /*
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
19 * adjusting as appropriate, when width is sufficient...
d7b2bb282421 mingw-w64: patch mingw-w64 for %g bug
John Donoghue
parents:
diff changeset
20 */