Mercurial > mxe-octave
view src/octave-1-gnulib-isatty.patch @ 3721:933b99febcf1
Expand options to support 3 possible sources of octave
* configure.ac: modify --enable-stable rule to --enable-octave=source (stable,alpha,default)
* Makefile.am: modify OCTAVE_TARGET based on octave build value set in configure.
* index.html: added master-octave information.
* src/default-octave.mk: new file.
* src/default-octave-1-docinstall.patch
* dist-files.mk: add default-octave-1-docinstall.patch default-octave.mk
* binary-dist-rules.mk: use OCTAVE_TARGET to decide on tarball/installer name
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 19 Oct 2014 22:58:20 -0400 |
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)