simon-git: putty (main): Jacob Nevins

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Aug 29 17:46:22 BST 2022


TL;DR:
  baea34a5 Reinstate __USE_MINGW_ANSI_STDIO for MinGW builds.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Jacob Nevins <jacobn at chiark.greenend.org.uk>
Date:           2022-08-29 17:46:22

commit baea34a5b2d9cd5734c1f4ebf8f4dc121d227820
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=baea34a5b2d9cd5734c1f4ebf8f4dc121d227820;hp=55d19f62951f6fd91350728fd3573bad87e663c6
Author: Jacob Nevins <jacobn at chiark.greenend.org.uk>
Date:   Mon Aug 29 13:00:56 2022 +0100

    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.

 cmake/toolchain-mingw.cmake | 2 ++
 1 file changed, 2 insertions(+)



More information about the tartarus-commits mailing list