[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti added the comment: For the record, I am basing the version check code on Boost also: https://www.boost.org/doc/libs/1_65_1/boost/convert/detail/config.hpp -- ___ Python tracker <https://bugs.python.org/issue36

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti added the comment: I have the following internal, almost-minimal test case for this bug. It also relies on Boost Python, but that could be eliminated to produce a similar test case. # CMakeLists.txt cmake_minimum_required(VERSION 3.0) project(python-boost-mcve) set

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti 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 defi

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
New submission from palotasb-conti : Abstract: pyerrors.h defines snprintf as a macro on MSVC even on versions of MSVC where this workaround causes bugs. snprintf is defined as _snprintf in pyerrors.h, see: https://github.com/python/cpython/blob/ac28147e78c45a6217d348ce90ca5281d91f676f