]> granicus.if.org Git - python/commitdiff
Issue #17596: MINGW: add wincrypt.h in Python/random.c
authorMartin Panter <vadmium+py@gmail.com>
Fri, 29 Jul 2016 04:00:44 +0000 (04:00 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Fri, 29 Jul 2016 04:00:44 +0000 (04:00 +0000)
Based on patch by Roumen Petrov.

Misc/NEWS
Python/random.c

index 5e75997c8ce42f5ac4bf384182af3e23b5a884fe..6ad1c3a72376dc0788c99e7bb064c7a8def5b2cb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 3.6.0 alpha 4
 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.
 
index c8e844ee678da131a94ec42fe53f83fe5f4fad17..945269a2f6c84c68bc698b1d1cceae3dfaf4c954 100644 (file)
@@ -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