Blob Blame History Raw
diff -rupN Python-2.7.13/configure.ac Python-2.7.13-new/configure.ac
--- Python-2.7.13/configure.ac	2017-01-21 01:46:10.316566878 +0100
+++ Python-2.7.13-new/configure.ac	2017-01-21 01:46:10.607563771 +0100
@@ -4496,6 +4496,28 @@ fi
 # check for endianness
 AC_C_BIGENDIAN
 
+# REPARSE_DATA_BUFFER is in winnt.h on mingw32 and (unusably) ddk/ntifs.h on mingw64.
+case $host in
+  *-*-mingw*)
+AC_CACHE_CHECK([if struct REPARSE_DATA_BUFFER is in winnt.h],
+[ac_cv_struct_reparse_data_buffer_in_winnt_h],
+  [AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM(
+      [#include <windows.h>
+       #include <winnt.h>],
+      [REPARSE_DATA_BUFFER rdb],
+    )],
+    [ac_cv_struct_reparse_data_buffer_in_winnt_h=yes],
+    [ac_cv_struct_reparse_data_buffer_in_winnt_h=no]
+  )
+])
+if test "x${ac_cv_struct_reparse_data_buffer_in_winnt_h}" = xyes; then
+  AC_DEFINE([REPARSE_DATA_BUFFER_IN_WINNT], [], [REPARSE_DATA_BUFFER in winnt.h])
+  AC_SUBST(REPARSE_DATA_BUFFER_IN_WINNT)
+fi
+  ;;
+esac
+
 # Check whether right shifting a negative integer extends the sign bit
 # or fills with zeros (like the Cray J90, according to Tim Peters).
 AC_MSG_CHECKING(whether right shift extends the sign bit)