#17736: Wrong long long format specifier when using MSYS2

12 views
Skip to first unread message

wxTrac

unread,
Dec 2, 2016, 7:07:37 AM12/2/16
to wx-...@googlegroups.com
#17736: Wrong long long format specifier when using MSYS2
------------------------+--------------------
Reporter: lpoujoulat | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.0
Keywords: MinGW ANSI | Blocked By:
Blocking: | Patch: 1
------------------------+--------------------
wxLongLongFmtSpec is defined to be "I64" with versions of MinGW32/64 that
are configured to use the GNU specifiers in printf(), like the MSYS2
toolchains.

The format specifier in this case should be defined as "ll".

Attached a trivial patch for this.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/17736>

wxTrac

unread,
Dec 2, 2016, 2:49:17 PM12/2/16
to wx-...@googlegroups.com
#17736: Wrong long long format specifier when using MSYS2
-------------------------+-------------------------------------
Reporter: lpoujoulat | Owner: Vadim Zeitlin <vadim@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.0
Resolution: fixed | Keywords: MinGW ANSI
Blocked By: | Blocking:
Patch: 1 |
-------------------------+-------------------------------------
Changes (by Vadim Zeitlin <vadim@…>):

* status: new => closed
* owner: => Vadim Zeitlin <vadim@…>
* resolution: => fixed


Comment:

In [changeset:"7c730334a2021775bbfc6bbb16d8c393df4be003/git-wxWidgets"]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="7c730334a2021775bbfc6bbb16d8c393df4be003"
Fix long long format specifier when using MinGW with ANSI STDIO

When using MinGW own, more standard-compliant, STDIO library, the correct
format specified to use for long long values is "%lld" and not "%I64d" as
when
using MSVC CRT.

Closes #17736.
}}}

--
Ticket URL: <http://trac.wxwidgets.org/ticket/17736#comment:1>

wxTrac

unread,
Dec 12, 2016, 5:40:52 PM12/12/16
to wx-...@googlegroups.com
#17736: Wrong long long format specifier when using MSYS2
-------------------------+-------------------------------------
Reporter: lpoujoulat | Owner: Vadim Zeitlin <vadim@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.0
Resolution: fixed | Keywords: MinGW ANSI
Blocked By: | Blocking:
Patch: 1 |
-------------------------+-------------------------------------

Comment (by Vadim Zeitlin <vadim@…>):

In [changeset:"04428890b7480ff57aa1fd23230f3a7c9bf91fa5/git-wxWidgets"]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="04428890b7480ff57aa1fd23230f3a7c9bf91fa5"
Fix warning about undefined macro when cross-compiling with MinGW

__USE_MINGW_ANSI_STDIO is apparently not defined when using MinGW as a
cross-compiler from Linux, so 7c730334a2021775bbfc6bbb16d8c393df4be003
resulted in -Wundef warning about this.

Fix this by checking if the macro is defined before testing its value.

See #17736.
}}}

--
Ticket URL: <http://trac.wxwidgets.org/ticket/17736#comment:2>
Reply all
Reply to author
Forward
0 new messages