Author palotasb-conti
Recipients matrixise, palotasb-conti, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-02-18.12:00:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550491210.46.0.685552718295.issue36020@roundup.psfhosted.org>
In-reply-to
Content
@matrixise:

It works on my machine. ;)

I would also add a check for `defined(_MSC_VER)` before `_MSC_VER < 1900` because the `MS_WIN32` does not seem to imply that the `_MSC_VER` macro is defined [1]. The correct check could be either

    #if defined(MS_WIN32) && !defined(HAVE_SNPRINTF) && defined(_MSC_VER) && _MSC_VER < 1900

or

    #if defined(MS_WIN32) && !defined(HAVE_SNPRINTF) && (!defined(_MSC_VER) || _MSC_VER < 1900)

I don't know whether (MS_WIN32 && !defined(_MSC_VER)) means that there is an `(std::)snprintf` function available or if it needs to be redefined to _snprintf -- or even is such a configuration exists and is supported by Python. If I had to guess though, then the first version should be correct since the macro was already defined for MS_WIN32 regardless of _MSC_VER.

The VMs seem OK to me for testing.

[1] see https://github.com/python/cpython/blob/8a1657b93469580ef345c7c91738587f3d76e87d/PC/pyconfig.h#L68,L84
History
Date User Action Args
2019-02-18 12:00:10palotasb-contisetrecipients: + palotasb-conti, paul.moore, tim.golden, zach.ware, steve.dower, matrixise
2019-02-18 12:00:10palotasb-contisetmessageid: <1550491210.46.0.685552718295.issue36020@roundup.psfhosted.org>
2019-02-18 12:00:10palotasb-contilinkissue36020 messages
2019-02-18 12:00:10palotasb-conticreate