Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

sprintf %+u fails on mingw only #832

Open
rurban opened this Issue · 2 comments

1 participant

@rurban
Collaborator

t/op/sprintf.t test 217

Works okay on cygwin, and msvc, so it looks like a libgcc_s_dw2-1.dll issue.

@rurban rurban was assigned
@rurban
Collaborator

Same problem in t/op/string.t: 196, 198 on mingw

not ok 196 - 1 == %+vu
# Have: 1 == +1
# Want: 1 == 1
ok 197 - 001 == %0.3u
not ok 198 - 001 == %+0.3u
# Have: 001 == +001
# Want: 001 == 001
@rurban rurban closed this
@rurban
Collaborator

Working on a fix in spf_render.c.
Probe for PARROT_HAS_BROKEN_SPRINTF_UPLUS and skip the + in %+..u.

Interestingly the probe passes on mingw but parrot fails...

@rurban rurban reopened this
@rurban rurban referenced this issue from a commit
@rurban rurban [GH #832] Probe for broken snprintf %+..u in mingw and fix it.
snprintf %+u fails on mingw only. t/op/sprintf.t test 217 and
t/op/string.t: 196, 198 (now 197)
The + is always printed, but should not.

As it works okay in win32 (with msvcrt.ll) and cygwin (cygwin1.dll)
on the same system, I assumed it's mingw only snprintf/sprintf wrapper
issue.

Probe in auto:snprintf for PARROT_HAS_BROKEN_SPRINTF_UPLUS and skip
the '+' in %+..u in spf_render.c.

But the probe is not yet correct. It passes on mingw, but should fail.
1e44cc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.