[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] Use inttypes macros for size_t format string
[Thread Prev] | [Thread Next]
- Subject: Re: [patch] Use inttypes macros for size_t format string
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Jan 2020 13:41:57 +0100
- To: libssh@xxxxxxxxxx, Jakub Jelen <jjelen@xxxxxxxxxx>
- Cc: g4-lisz@xxxxxxxxxxxx
On Thursday, 16 January 2020 12:30:24 CET Jakub Jelen wrote: > > > > It's not really a compiler bug. See here: > > > > https://stackoverflow.com/questions/44382862/how-to-printf-a-size-t-wi > > > > thou > > > > t-> warning-in-mingw-w64-gcc-7-1 > > > > > > According to that you need to compile with: > > > > > > cmake -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" .. > > > > Alternative seems to be: > > > > -Dsnprintf=__mingw_snprintf -Dvsnprintf=__mingw_vsnprintf ... > > Is this something that can be automatically done by some cmake check if > the mingw cross-compilation is detected? I think till needs to confirm it works and then I can you can do: if (MINGW AND WIN32) add_definitions(__USE_MINGW_ANSI_STDIO=1) endif() ... -- Andreas Schneider asn@xxxxxxxxxxxxxx GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
Re: [patch] Use inttypes macros for size_t format string | g4-lisz@xxxxxxxxxxxx |
[patch] Use inttypes macros for size_t format string | g4-lisz@xxxxxxxxxxxx |
Re: [patch] Use inttypes macros for size_t format string | Andreas Schneider <asn@xxxxxxxxxxxxxx> |
Re: [patch] Use inttypes macros for size_t format string | Jakub Jelen <jjelen@xxxxxxxxxx> |