Re: [hatari-devel] Warnings with Windows build |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Warnings with Windows build
- From: Christian Zietz <czietz@xxxxxxx>
- Date: Sun, 21 Aug 2022 10:53:25 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1661072006; bh=4xANxnacX7wGgr76W0zZc0oNF+TLPqJo+oC/GibVcJM=; h=X-UI-Sender-Class:Date:To:References:From:Subject:In-Reply-To; b=POgeLml+YjTBmaPZpnkyc4BHH4iD80y5f6Yk86ZttlnTFVxFAWMEpMafrtALl1UOI uJWBZ/T286rR+CD3w15sMb5hMpFxZHAk7jhaYoHpAvveD/uKBDPSrNTST75AqOXq+g MN7i6el+zPelRb8WIRNjrzKiuQSTSOu0fyQX+8fc=
Thorsten Otto schrieb:
Depends on what you count as "supported windows version". In Windows 7, that
does *not* work
Windows 7 is out of support.
Workaround typically is to define
__USE_MINGW_ANSI_STDIO so the printf function (and also the attribute(printf))
is redirected to gnu_printf
MingW already does that for you when compiling C99 source code, such as
Hatari:
https://github.com/mirror/mingw-w64/blob/6eb571448c696782f06f36de394950fca4402c68/mingw-w64-headers/crt/_mingw.h.in#L425-L437
This is precisely the reason why PRId64 expands to "lld" in the first
place in the warning I quoted in my initial post. If you read the link
that I posted [1], you will see that defining __USE_MINGW_ANSI_STDIO
does *NOT* silence the warning as it does *NOT* redefine
__attribute__((__format__ (printf [...] in Hatari's code.
Feel free to test yourself if you don't believe that I have tested it!
Regards
Christian
[1]
https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/#user-printf-and-scanf
--
Christian Zietz - CHZ-Soft - czietz@xxxxxxx
WWW: https://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA