1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/cmake
Jacob Nevins baea34a5b2 Reinstate __USE_MINGW_ANSI_STDIO for MinGW builds.
This was lost in the mkfiles.pl->cmake transition (c19e7215dd).
Without this, MinGW builds were providing format strings like %zu to a
version of vsnprintf that didn't support them at runtime, so you'd get
messages like "Pageant has zu SSH-2 keys". (-Wformat would have
complained about the unknown %z format specifier, but even STRICT MinGW
builds don't get those warnings, hm.)
Now the runtime version understands %zu.

I've reviewed the other compile-time definitions that were unique to the
old Makefile.mgw, and decided not to reinstate any of them:

WIN32S_COMPAT: leave it out.
This came in in bd4b8c1285. Rationale from Joris van Rantwijk in email
2000-01-24: "Use -DWIN32S_COMPAT to avoid a linking error about
SystemPowerStatus".
But that problem was solved another way within 8 months, and
WIN32S_COMPAT removed from the code, in 76746a7d61, so this wart had
been redundant since then.

_NO_OLDNAMES: decided not to add anything back for this.
This actually does nothing with the mingw-w64 fork (which seems to spell
it NO_OLDNAMES), although current versions of original-mingw do also
still spell it _NO_OLDNAMES.
They both seem to be about suppressing a behaviour where a load of
"non-ANSI" names like strdup get redirected to invoke _strdup in MS'
libraries.
Again, original rationale is from Joris van Rantwijk: "Compile and link
with -mno-cygwin (and -D_NO_OLDNAMES) to get executables that don't need
the Cygwin DLL file."
Since I don't know of any behavioural differences that this causes
(unlike vsnprintf/_vsnprintf), and it's not obviously causing trouble
for me, continue to leave things in the default state.
2022-08-29 17:22:28 +01:00
..
platforms Fix Unix builds with PUTTY_GSSAPI=OFF. 2022-05-28 12:56:50 +01:00
cmake.h.in Implement AES-GCM using the @openssh.com protocol IDs. 2022-08-16 20:33:58 +01:00
gitcommit.cmake Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
gtk.cmake Fix pre-GTK3 build failures in puttyapp / ptermapp. 2021-12-18 11:43:57 +00:00
licence.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
setup.cmake Use correct flags for RelWithDebInfo. 2022-05-19 23:23:14 +01:00
toolchain-mingw.cmake Reinstate __USE_MINGW_ANSI_STDIO for MinGW builds. 2022-08-29 17:22:28 +01:00
toolchain-winegcc.cmake Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00
winegcc Replace mkfiles.pl with a CMake build system. 2021-04-17 13:53:02 +01:00