external/python3/python-3.3.3-py17797.patch.1 | 87 ++++++++++---------------- sw/source/core/doc/doclay.cxx | 3 2 files changed, 35 insertions(+), 55 deletions(-)
New commits: commit b424497fa2d7391857915bc1beb08918b37cd755 Author: Michael Stahl <mst...@redhat.com> Date: Wed May 6 22:28:05 2015 +0200 tdf#82968: python3: fix stdio detection on WNT harder Upgrade to the latest patch from http://bugs.python.org/issue17797 which appears to work even if you invoke from cmd.exe Change-Id: I85f1cc5ad7d8c059d972ae2a6fd2be1bb5604c2c (cherry picked from commit be3e1d65f50fe8b4ce5e4a87a82ff231c00aae79) Reviewed-on: https://gerrit.libreoffice.org/15688 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/external/python3/python-3.3.3-py17797.patch.1 b/external/python3/python-3.3.3-py17797.patch.1 index d4f7ab8..8fcb703 100644 --- a/external/python3/python-3.3.3-py17797.patch.1 +++ b/external/python3/python-3.3.3-py17797.patch.1 @@ -4,59 +4,42 @@ http://connect.microsoft.com/VisualStudio/feedback/details/785119/ Visual Studio 2012 changed return value for fileno function that breaks when python tries to check/setup stdin/out/err GetStdHandle on Windows XP behaves contrary to the documentation... -diff -ur python3.org/Python/pythonrun.c python3/Python/pythonrun.c ---- python3.org/Python/pythonrun.c 2014-05-24 16:36:20.361672900 +0200 -+++ python3/Python/pythonrun.c 2014-05-24 16:37:38.424159100 +0200 -@@ -1036,7 +1036,15 @@ - int status = 0, fd; - PyObject * encoding_attr; - char *encoding = NULL, *errors; -- -+#ifdef MS_WINDOWS -+ OSVERSIONINFOEX osvi; -+ BOOL bIsWindowsXP; + +diff --git a/Python/pythonrun.c b/Python/pythonrun.c +index 91d56b7..d28ffc7 100644 +--- a/Python/pythonrun.c ++++ b/Python/pythonrun.c +@@ -1015,13 +1015,28 @@ error: + static int + is_valid_fd(int fd) + { +- int dummy_fd; + if (fd < 0 || !_PyVerify_fd(fd)) + return 0; +- dummy_fd = dup(fd); +- if (dummy_fd < 0) +- return 0; +- close(dummy_fd); + -+ ZeroMemory(&osvi, sizeof(osvi)); -+ osvi.dwOSVersionInfoSize = sizeof(osvi); -+ GetVersionEx(&osvi); -+ bIsWindowsXP = (osvi.dwMajorVersion < 6); -+#endif - /* Hack to avoid a nasty recursion issue when Python is invoked - in verbose mode: pre-import the Latin-1 and UTF-8 codecs */ - if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) { -@@ -1084,7 +1092,11 @@ - * and fileno() may point to an invalid file descriptor. For example - * GUI apps don't have valid standard streams by default. - */ -+#ifdef MS_WINDOWS -+ if (!is_valid_fd(fd) || GetStdHandle(STD_INPUT_HANDLE) == NULL || bIsWindowsXP) { ++#if defined(MS_WINDOWS) && defined(HAVE_FSTAT) ++ /* dup (DuplicateHandle) doesn't say fd is a valid *file* handle. ++ * It could be a current thread pseudo-handle. ++ */ ++ { ++ struct stat buf; ++ if (fstat(fd, &buf) < 0 && (errno == EBADF || errno == ENOENT)) ++ return 0; ++ } +#else - if (!is_valid_fd(fd)) { ++ { ++ int dummy_fd; ++ dummy_fd = dup(fd); ++ if (dummy_fd < 0) ++ return 0; ++ close(dummy_fd); ++ } +#endif - std = Py_None; - Py_INCREF(std); - } -@@ -1099,7 +1111,11 @@ ++ + return 1; + } - /* Set sys.stdout */ - fd = fileno(stdout); -+#ifdef MS_WINDOWS -+ if (!is_valid_fd(fd) || GetStdHandle(STD_OUTPUT_HANDLE) == NULL || bIsWindowsXP) { -+#else - if (!is_valid_fd(fd)) { -+#endif - std = Py_None; - Py_INCREF(std); - } -@@ -1115,7 +1131,11 @@ - #if 1 /* Disable this if you have trouble debugging bootstrap stuff */ - /* Set sys.stderr, replaces the preliminary stderr */ - fd = fileno(stderr); -+#ifdef MS_WINDOWS -+ if (!is_valid_fd(fd) || GetStdHandle(STD_ERROR_HANDLE) == NULL || bIsWindowsXP) { -+#else - if (!is_valid_fd(fd)) { -+#endif - std = Py_None; - Py_INCREF(std); - } commit c127bd129667232d20653aadd7ba2a5344ed8f0a Author: Michael Stahl <mst...@redhat.com> Date: Sat May 9 00:30:45 2015 +0200 sw: remove bogus assert in SwDoc::IsInHeaderFooter() If the for loop has a break after the first frame anchored on that node, it makes no sense to assert that all frames have been visited. (regression from bb95f7e6f7c9b1281875e6d729b66b6018794ee0) Change-Id: Ibd8d65f286b441127be7735c63f4b84ba94dcb6f (cherry picked from commit fb0553d6b4905fe2c923a2b5591c001d0be52398) Reviewed-on: https://gerrit.libreoffice.org/15687 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index b2f57f6..6e35170 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1565,9 +1565,6 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const OSL_ENSURE( mbInReading, "Found a FlySection but not a Format!" ); return false; } -#if OSL_DEBUG_LEVEL > 0 - assert( checkFmts.empty()); -#endif } return 0 != pNd->FindHeaderStartNode() ||
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits