Files
MINGW-packages/mingw-w64-python2/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch

45 lines
1.3 KiB
Diff

diff -Naur a/configure.ac b/configure.ac
--- a/configure.ac 2014-02-18 09:31:51.903800000 +0400
+++ b/configure.ac 2014-02-18 09:31:52.044200000 +0400
@@ -3521,6 +3521,27 @@
AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)])
fi
+case $host in
+ *-*-mingw*)
+ dnl See Modules/posixmodule.c for details.
+ dnl Also check below distinguish wingw and mingw-w64
+ AC_MSG_CHECKING([for REPARSE_DATA_BUFFER])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <windows.h>
+#include <winnt.h>
+], [
+ REPARSE_DATA_BUFFER rdb
+])],
+ [py_reparse_data_buffer=yes],
+ [py_reparse_data_buffer=no]
+ )
+ AC_MSG_RESULT([$py_reparse_data_buffer])
+ if test yes = $py_reparse_data_buffer; then
+ AC_DEFINE([HAVE_REPARSE_DATA_BUFFER],[1],[Define to 1 if you have the 'REPARSE_DATA_BUFFER' structure.])
+ fi
+ ;;
+esac
+
# checks for compiler characteristics
AC_C_CHAR_UNSIGNED
diff -Naur a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in 2014-02-18 09:31:40.640600000 +0400
+++ b/pyconfig.h.in 2014-02-18 09:31:52.044200000 +0400
@@ -547,6 +547,9 @@
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
+/* Define to 1 if you have the 'REPARSE_DATA_BUFFER' structure. */
+#undef HAVE_REPARSE_DATA_BUFFER
+
/* Define if you have readline 2.1 */
#undef HAVE_RL_CALLBACK