Replace some _MSC_VER with _WIN32.

This allows to use some code for mingw which was previously only
used for MSVC.

llvm-svn: 203651
This commit is contained in:
Hafiz Abid Qadeer 2014-03-12 10:45:23 +00:00
parent bdb515916c
commit 6eff101926
9 changed files with 11 additions and 11 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -11,7 +11,7 @@
#include <stddef.h>
// C Includes
#if !defined(_MSC_VER)
#if !defined(_WIN32)
#include <arpa/inet.h>
#endif
#include <assert.h>

View File

@ -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"

View File

@ -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)

View File

@ -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;

View File

@ -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>

View File

@ -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