[Python-checkins] cpython: Issue #17596: MINGW: add wincrypt.h in Python/random.c

martin.panter python-checkins at python.org
Fri Jul 29 00:05:05 EDT 2016


https://hg.python.org/cpython/rev/11ed7c49f5df
changeset:   102482:11ed7c49f5df
user:        Martin Panter <vadmium+py at gmail.com>
date:        Fri Jul 29 04:00:44 2016 +0000
summary:
  Issue #17596: MINGW: add wincrypt.h in Python/random.c

Based on patch by Roumen Petrov.

files:
  Misc/NEWS       |  2 ++
  Python/random.c |  3 +++
  2 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@
 Core and Builtins
 -----------------
 
+- Issue #17596: Include <wincrypt.h> to help with Min GW building.
+
 - Issue #27507: Add integer overflow check in bytearray.extend().  Patch by
   Xiang Zhang.
 
diff --git a/Python/random.c b/Python/random.c
--- a/Python/random.c
+++ b/Python/random.c
@@ -1,6 +1,9 @@
 #include "Python.h"
 #ifdef MS_WINDOWS
 #  include <windows.h>
+/* All sample MSDN wincrypt programs include the header below. It is at least
+ * required with Min GW. */
+#  include <wincrypt.h>
 #else
 #  include <fcntl.h>
 #  ifdef HAVE_SYS_STAT_H

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list