summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/kwsys/ConsoleBuf.hxx.in16
2 files changed, 13 insertions, 5 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c656fba..ea6bdad 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 7)
-set(CMake_VERSION_PATCH 20161025)
+set(CMake_VERSION_PATCH 20161026)
#set(CMake_VERSION_RC 1)
diff --git a/Source/kwsys/ConsoleBuf.hxx.in b/Source/kwsys/ConsoleBuf.hxx.in
index 8aeeda1..2496b45 100644
--- a/Source/kwsys/ConsoleBuf.hxx.in
+++ b/Source/kwsys/ConsoleBuf.hxx.in
@@ -239,8 +239,12 @@ namespace @KWSYS_NAMESPACE@
m_activeInputCodepage = input_file_codepage;
break;
case FILE_TYPE_CHAR:
- m_isConsoleInput = true;
- break;
+ // Check for actual console.
+ DWORD consoleMode;
+ m_isConsoleInput = GetConsoleMode(m_hInput, &consoleMode) == 0 ? false : true;
+ if (m_isConsoleInput) {
+ break;
+ }
case FILE_TYPE_PIPE:
m_activeInputCodepage = input_pipe_codepage;
break;
@@ -259,8 +263,12 @@ namespace @KWSYS_NAMESPACE@
m_activeOutputCodepage = output_file_codepage;
break;
case FILE_TYPE_CHAR:
- m_isConsoleOutput = true;
- break;
+ // Check for actual console.
+ DWORD consoleMode;
+ m_isConsoleOutput = GetConsoleMode(m_hOutput, &consoleMode) == 0 ? false : true;
+ if (m_isConsoleOutput) {
+ break;
+ }
case FILE_TYPE_PIPE:
m_activeOutputCodepage = output_pipe_codepage;
break;