Eryk Sun <eryk...@gmail.com> added the comment:
"crtdbg.h" doesn't provide STATUS_CONTROL_C_EXIT, but it should be fine to remove it anyway. I think it was left behind by accident in 2007. It was added to support a PYTHONNOERRORWINDOW environment variable, but then this idea was dropped in favor of extending the msvcrt module: * https://grokbase.com/t/python/python-3000/078wkax0sd/buildbots * https://github.com/python/cpython/commit/945362cf971fb2e10f8f2a8e71e8ff10516ebe4c#diff-75445bdc3b6b3dd20b005698fa165444 * https://github.com/python/cpython/commit/3dc33d18452de871cff98914dda81ff00b4d00f6#diff-75445bdc3b6b3dd20b005698fa165444 I presume STATUS_CONTROL_C_EXIT gets included from "winnt.h" -> "Windows.h" -> "Include/internal/pycore_condvar.h" -> "Include/internal/pycore_gil.h" -> "Include/internal/pycore_pystate.h". If [STATUS_]CONTROL_C_EXIT isn't defined, I suggest defining WIN32_LEAN_AND_MEAN before including "Windows.h". This reduces the number of included headers from about 350 down to about 200. Also, to stay strictly within the Windows API, we might want to use CONTROL_C_EXIT (from [min]winbase.h) instead of STATUS_CONTROL_C_EXIT (from "winnt.h"). ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36965> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com