Fix Windows build, broken by the inclusion of sys/ioctl.h and isatty()
authorDeepak Panickal <deepak@codeplay.com>
Mon, 17 Feb 2014 17:43:39 +0000 (17:43 +0000)
committerDeepak Panickal <deepak@codeplay.com>
Mon, 17 Feb 2014 17:43:39 +0000 (17:43 +0000)
llvm-svn: 201522

lldb/source/Host/common/File.cpp

index dcb272a..bb0ee39 100644 (file)
 #include <stdarg.h>
 #include <stdio.h>
 #include <sys/stat.h>
-#include <sys/ioctl.h>
 
 #ifdef _WIN32
 #include "lldb/Host/windows/windows.h"
+#else
+#include <sys/ioctl.h>
 #endif
 
 #include "lldb/Core/DataBufferHeap.h"
@@ -886,6 +887,7 @@ File::CalculateInteractiveAndTerminal ()
     {
         m_is_interactive = eLazyBoolNo;
         m_is_real_terminal = eLazyBoolNo;
+#ifndef _MSC_VER
         if (isatty(fd))
         {
             m_is_interactive = eLazyBoolYes;
@@ -896,6 +898,7 @@ File::CalculateInteractiveAndTerminal ()
                     m_is_real_terminal = eLazyBoolYes;
             }
         }
+#endif
     }
 }