From 6200ebad1c3eebcc39fbc7a28aafb7aaed5cc121 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Fri, 1 Feb 2008 16:07:46 -0330 Subject: Possible fix for python/mcpp failure on Windows --- cpp/src/Slice/Preprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src/Slice/Preprocessor.cpp') diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 10047df7cb3..7b3acd99500 100755 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -157,8 +157,7 @@ Slice::Preprocessor::preprocess(bool keepComments) // we need to save handle to stdin so we can restore it // after mcpp has finished its processing. // -#ifdef _WIN32 -#else +#ifndef _WIN32 int stdin_save; stdin_save = dup(0); #endif @@ -174,6 +173,7 @@ Slice::Preprocessor::preprocess(bool keepComments) // Restore stdin. // #ifdef _WIN32 + freopen("CON", "rt", stdin); #else fflush(stdin); ::close(0); -- cgit v1.2.3