palotasb-conti <[email protected]> added the
comment:
@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
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com