Fix warnings generated by clang-cl.

There were a couple of real bugs here regarding error checking and
signed/unsigned comparisons, but mostly these were just noise.

There was one class of bugs fixed here which is particularly
annoying, dealing with MSVC's non-standard behavior regarding
the underlying type of enums.  See the comment in
lldb-enumerations.h for details.  In short, from now on please use
FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which
contain values larger than can fit into a signed integer.

llvm-svn: 233943
diff --git a/lldb/source/Utility/PseudoTerminal.cpp b/lldb/source/Utility/PseudoTerminal.cpp
index e728d4a..302c265 100644
--- a/lldb/source/Utility/PseudoTerminal.cpp
+++ b/lldb/source/Utility/PseudoTerminal.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
 #include "lldb/Utility/PseudoTerminal.h"
 
 #include <errno.h>
@@ -237,12 +238,10 @@
 {
     if (error_str)
         error_str[0] = '\0';
-
     pid_t pid = LLDB_INVALID_PROCESS_ID;
+#if !defined(LLDB_DISABLE_POSIX)
     int flags = O_RDWR;
-#if !defined(_MSC_VER)
     flags |= O_CLOEXEC;
-#endif
     if (OpenFirstAvailableMaster (flags, error_str, error_len))
     {
         // Successfully opened our master pseudo terminal
@@ -300,6 +299,7 @@
             // Do nothing and let the pid get returned!
         }
     }
+#endif
     return pid;
 }