This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: mingw: add wincrypt.h in Python/random.c
Type: enhancement Stage: resolved
Components: Build, Cross-Build, Windows Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, martin.panter, paul.moore, pitrou, python-dev, rpetrov, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2013-03-31 19:52 by rpetrov, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
0007-MINGW-add-wincrypt.h-in-Python-random.c.patch rpetrov, 2013-03-31 19:52
0006-MINGW-add-wincrypt.h-in-Python-random.c.patch rpetrov, 2014-08-03 06:11 status on 2014-08-02
MINGW-wincrypt.v3.patch martin.panter, 2016-03-10 10:02 review
Messages (6)
msg185656 - (view) Author: Roumen Petrov (rpetrov) * Date: 2013-03-31 19:52
split of issue3871
msg185672 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-03-31 20:54
Why the "#ifdef __MINGW32__"? I suppose the include is harmless anyway.
msg261489 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-03-10 10:02
Yes I would tend to think including <wincrypt.h> would be harmless on Windows, but I don’t have a native Windows to try it out on. Here is a proposed patch anyway. It would be good for someone to be able to confirm it doesn’t break the normal Windows build.
msg271599 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-29 03:53
I think this one should be fairly safe; any breakage should be pretty obvious by watching the buildbots.
msg271600 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-29 04:05
New changeset 11ed7c49f5df by Martin Panter in branch 'default':
Issue #17596: MINGW: add wincrypt.h in Python/random.c
msg271601 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-29 04:13
For the record, the first error without this patch is

../Python/random.c:26:1: error: unknown type name 'HCRYPTPROV'

According to <>, the header to use is <Wincrypt.h>, but we use lowercase <wincrypt.h> to avoid a problem with case sensitivity.
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61796
2016-07-29 04:13:30martin.pantersetstatus: open -> closed
resolution: fixed
messages: + msg271601

stage: commit review -> resolved
2016-07-29 04:05:14python-devsetnosy: + python-dev
messages: + msg271600
2016-07-29 03:53:16martin.pantersetmessages: + msg271599
stage: patch review -> commit review
2016-03-11 21:04:42martin.panterlinkissue17605 dependencies
2016-03-10 10:02:32martin.pantersetfiles: + MINGW-wincrypt.v3.patch

components: + Windows
versions: + Python 3.6, - Python 3.4
nosy: + martin.panter, paul.moore, tim.golden, Alex.Willmer, zach.ware, steve.dower

messages: + msg261489
stage: patch review
2014-08-03 06:11:29rpetrovsetfiles: + 0006-MINGW-add-wincrypt.h-in-Python-random.c.patch
2013-03-31 20:54:57pitrousetnosy: + pitrou
messages: + msg185672
2013-03-31 19:52:30rpetrovcreate