Mercurial > mxe-octave
view src/octave-1-gnulib-isatty.patch @ 3762:86d65a780bab
epstool: added package
* dist-files.mk: added epstool.mk, mingw-epstool-1-fixes.patch
* index.html: added epstool package
* src/default-octave.mk: added epstool as dependancy
* src/mingw-epstool-1-fixes.patch: new file.
* src/octave.mk: added epstool as dependancy
* src/stable-octave.mk: added epstool as dependancy
* src/epstool.mk: new file.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 06 Jan 2015 18:59:50 -0500 |
parents | 1e623b4ce67b |
children |
line wrap: on
line source
Patch based on savannah.gnu.org/bugs/?327623#attached diff -ur octave-3.8.2-rc2.orig/libgnu/isatty.c octave-3.8.2-rc2/libgnu/isatty.c --- octave-3.8.2-rc2.orig/libgnu/isatty.c 2014-08-12 15:31:01.710229546 -0400 +++ octave-3.8.2-rc2/libgnu/isatty.c 2014-08-12 15:41:15.603406658 -0400 @@ -34,7 +34,13 @@ /* Optimized test whether a HANDLE refers to a console. See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */ -#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3) +//#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3) +static BOOL +IsConsoleHandle(HANDLE h) +{ + DWORD mode; + return GetConsoleMode(h, &mode) != 0; +} #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int diff -ur octave-3.8.2-rc2.orig/libgnu/select.c octave-3.8.2-rc2/libgnu/select.c --- octave-3.8.2-rc2.orig/libgnu/select.c 2014-08-12 15:31:01.704229427 -0400 +++ octave-3.8.2-rc2/libgnu/select.c 2014-08-12 15:44:44.268552023 -0400 @@ -84,7 +84,14 @@ /* Optimized test whether a HANDLE refers to a console. See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */ -#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3) +//#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3) +static BOOL +IsConsoleHandle(HANDLE h) +{ + DWORD mode; + return GetConsoleMode(h, &mode) != 0; +} + static BOOL IsSocketHandle (HANDLE h)