On Fri, Aug 5, 2016 at 3:32 AM, Steffan Karger <stef...@karger.me> wrote:

> Hi,
>
> On Fri, Aug 5, 2016 at 8:14 AM, Gert Doering <g...@greenie.muc.de> wrote:
> > On Thu, Aug 04, 2016 at 11:39:54PM -0400, Selva Nair wrote:
> >> -  msg(D_MTU_DEBUG, "%s: Adjusting frame parameters for crypto by %zu
> bytes",
> >> -      __func__, crypto_overhead);
> >> +  msg(D_MTU_DEBUG, "%s: Adjusting frame parameters for crypto by %d
> bytes",
> >> +      __func__, (int) crypto_overhead);
> >
> > Just for clarification: how does this break windows?  mingw builds, or
> > msvc builds?  Will it print "nothing" ("zu bytes") or wrong values?
>

mingw (my version is gcc 4.6.3)  prints zu bytes. I think this could be
also fixed by defining  __USE_MINGW_ANSI_STDIO=1

>
> > I had the suspicion that %zu wasn't as portable as Steffan hoped (and I
> > seem to remember we've been there before :) ) but was too lazy to
> > actually go out and research it.
> >
> > (Going to apply later today, so "ACK!", just curious)
>
> MSVC 2015 claims to support C99 now (took them 16 years!), and it
> should at least support %zu (which is part of C99).  Shouldn't we just
> move (at least the master branch) to C99?  Or are there good reasons
> to keep punishing ourselves with having to support C89?
>

I am totally in support of deprecating arcane MSVC (pre 2015?) support.  MS
way of printing size_t has been to use  "%Iu" (with an upper case i, not
'ell'), which indicates the required run-time support is there. But I am
not sure whether MSVC 2015 translates zu to Iu or only works on platforms
with a new runtime library.

Selva

Reply via email to