comparison src/octave-1-gnulib-isatty.patch @ 3686:1e623b4ce67b

octave: add gnulib isatty fix patch (bug #37623) * src/octave-1-gnulib-isatty.patch: added file. * src/stable-octave-1-gnulib-isatty.patch: added file * dist-files.mk: added octave-1-gnulib-isatty.patch, stable-octave-1-gnulib-isatty.patch * makeinst-script.sh: removed --line-editing option from shortcuts if Win8.
author John Donoghue <john.donoghue@ieee.org>
date Fri, 15 Aug 2014 22:27:34 -0400
parents
children
comparison
equal deleted inserted replaced
3685:2fe9db1b3f77 3686:1e623b4ce67b
1 Patch based on savannah.gnu.org/bugs/?327623#attached
2
3 diff -ur octave-3.8.2-rc2.orig/libgnu/isatty.c octave-3.8.2-rc2/libgnu/isatty.c
4 --- octave-3.8.2-rc2.orig/libgnu/isatty.c 2014-08-12 15:31:01.710229546 -0400
5 +++ octave-3.8.2-rc2/libgnu/isatty.c 2014-08-12 15:41:15.603406658 -0400
6 @@ -34,7 +34,13 @@
7
8 /* Optimized test whether a HANDLE refers to a console.
9 See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */
10 -#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
11 +//#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
12 +static BOOL
13 +IsConsoleHandle(HANDLE h)
14 +{
15 + DWORD mode;
16 + return GetConsoleMode(h, &mode) != 0;
17 +}
18
19 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
20 static int
21 diff -ur octave-3.8.2-rc2.orig/libgnu/select.c octave-3.8.2-rc2/libgnu/select.c
22 --- octave-3.8.2-rc2.orig/libgnu/select.c 2014-08-12 15:31:01.704229427 -0400
23 +++ octave-3.8.2-rc2/libgnu/select.c 2014-08-12 15:44:44.268552023 -0400
24 @@ -84,7 +84,14 @@
25
26 /* Optimized test whether a HANDLE refers to a console.
27 See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */
28 -#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
29 +//#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
30 +static BOOL
31 +IsConsoleHandle(HANDLE h)
32 +{
33 + DWORD mode;
34 + return GetConsoleMode(h, &mode) != 0;
35 +}
36 +
37
38 static BOOL
39 IsSocketHandle (HANDLE h)