summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>2014-03-12 10:45:23 +0000
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>2014-03-12 10:45:23 +0000
commit6eff101926830481b638e451c58e82275509d224 (patch)
tree94c25c23b1352ecb3a4dcd7d4836c4df7cbabba8
parentbdb515916c1f9787b7e9d8a56468bfe08b975098 (diff)
downloadbcm5719-llvm-6eff101926830481b638e451c58e82275509d224.tar.gz
bcm5719-llvm-6eff101926830481b638e451c58e82275509d224.zip
Replace some _MSC_VER with _WIN32.
This allows to use some code for mingw which was previously only used for MSVC. llvm-svn: 203651
-rw-r--r--lldb/include/lldb/lldb-defines.h2
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp4
-rw-r--r--lldb/source/Host/common/File.cpp2
-rw-r--r--lldb/source/Host/common/SocketAddress.cpp2
-rw-r--r--lldb/source/Host/windows/EditLineWin.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp2
-rw-r--r--lldb/source/Target/Process.cpp4
-rw-r--r--lldb/tools/driver/Platform.cpp2
-rw-r--r--lldb/tools/driver/Platform.h2
9 files changed, 11 insertions, 11 deletions
diff --git a/lldb/include/lldb/lldb-defines.h b/lldb/include/lldb/lldb-defines.h
index 1e504b01386..ae6d8cf77ec 100644
--- a/lldb/include/lldb/lldb-defines.h
+++ b/lldb/include/lldb/lldb-defines.h
@@ -12,7 +12,7 @@
#include "lldb/lldb-types.h"
-#if defined (_MSC_VER)
+#if defined (_WIN32)
#if defined(EXPORT_LIBLLDB)
#define LLDB_API __declspec(dllexport)
#elif defined(IMPORT_LIBLLDB)
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index 02133a95463..cba540e882b 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -1380,7 +1380,7 @@ ConnectionFileDescriptor::SocketListen (const char *host_and_port, Error *error_
{
struct sockaddr_in accept_addr;
::memset (&accept_addr, 0, sizeof accept_addr);
-#if !(defined (__linux__) || defined(_MSC_VER))
+#if !(defined (__linux__) || defined(_WIN32))
accept_addr.sin_len = sizeof accept_addr;
#endif
socklen_t accept_addr_len = sizeof accept_addr;
@@ -1402,7 +1402,7 @@ ConnectionFileDescriptor::SocketListen (const char *host_and_port, Error *error_
else
{
if (
-#if !(defined(__linux__) || (defined(_MSC_VER)))
+#if !(defined(__linux__) || (defined(_WIN32)))
accept_addr_len == listen_addr.sockaddr_in().sin_len &&
#endif
accept_addr.sin_addr.s_addr == listen_addr.sockaddr_in().sin_addr.s_addr)
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index 1051757932d..500b03ce42e 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -887,7 +887,7 @@ File::CalculateInteractiveAndTerminal ()
{
m_is_interactive = eLazyBoolNo;
m_is_real_terminal = eLazyBoolNo;
-#ifdef _MSC_VER
+#ifdef _WIN32
if (_isatty(fd))
{
m_is_interactive = eLazyBoolYes;
diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp
index 75f3cd13f58..971c4692bbb 100644
--- a/lldb/source/Host/common/SocketAddress.cpp
+++ b/lldb/source/Host/common/SocketAddress.cpp
@@ -11,7 +11,7 @@
#include <stddef.h>
// C Includes
-#if !defined(_MSC_VER)
+#if !defined(_WIN32)
#include <arpa/inet.h>
#endif
#include <assert.h>
diff --git a/lldb/source/Host/windows/EditLineWin.cpp b/lldb/source/Host/windows/EditLineWin.cpp
index d3d029d6652..381bf805067 100644
--- a/lldb/source/Host/windows/EditLineWin.cpp
+++ b/lldb/source/Host/windows/EditLineWin.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// this file is only relevant for Visual C++
-#if defined( _MSC_VER )
+#if defined( _WIN32 )
#include "lldb/Host/windows/windows.h"
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index a33f27e16e3..ffc948da9e9 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -702,7 +702,7 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname,
if (::mktemp (named_pipe_path))
{
-#if defined(_MSC_VER)
+#if defined(_WIN32)
if ( false )
#else
if (::mkfifo(named_pipe_path, 0600) == 0)
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index c869983aba0..1bf21e8c570 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4771,7 +4771,7 @@ public:
return true;
int fds[2];
-#ifdef _MSC_VER
+#ifdef _WIN32
// pipe is not supported on windows so default to a fail condition
int err = 1;
#else
@@ -4812,7 +4812,7 @@ public:
terminal.SetCanonical(false);
terminal.SetEcho(false);
// FD_ZERO, FD_SET are not supported on windows
-#ifndef _MSC_VER
+#ifndef _WIN32
while (!GetIsDone())
{
fd_set read_fdset;
diff --git a/lldb/tools/driver/Platform.cpp b/lldb/tools/driver/Platform.cpp
index 97c6d36979c..bb0c85d9a0f 100644
--- a/lldb/tools/driver/Platform.cpp
+++ b/lldb/tools/driver/Platform.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// this file is only relevant for Visual C++
-#if defined( _MSC_VER )
+#if defined( _WIN32 )
#include <process.h>
#include <assert.h>
diff --git a/lldb/tools/driver/Platform.h b/lldb/tools/driver/Platform.h
index 461fde686a8..51e7846f42a 100644
--- a/lldb/tools/driver/Platform.h
+++ b/lldb/tools/driver/Platform.h
@@ -12,7 +12,7 @@
#include "lldb/Host/HostGetOpt.h"
-#if defined( _MSC_VER )
+#if defined( _WIN32 )
// this will stop signal.h being included
#define _INC_SIGNAL
OpenPOWER on IntegriCloud