forked from OSchip/llvm-project
Patch from Kirk Beitz to make things compile on MinGW minus the putenv part.
llvm-svn: 125199
This commit is contained in:
parent
9e4aa0259f
commit
000aeb89ae
|
@ -10,15 +10,17 @@
|
|||
#include "lldb/Core/ConnectionFileDescriptor.h"
|
||||
|
||||
// C Includes
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef __APPLE__
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -616,7 +618,13 @@ ConnectionFileDescriptor::SocketConnect (const char *host_and_port, Error *error
|
|||
int
|
||||
ConnectionFileDescriptor::SetSocketOption(int fd, int level, int option_name, int option_value)
|
||||
{
|
||||
return ::setsockopt(fd, level, option_name, &option_value, sizeof(option_value));
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
const char* option_value_p = static_cast<const char*>(&option_value);
|
||||
#else // #if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
const void* option_value_p = &option_name;
|
||||
#endif // #if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
|
||||
return ::setsockopt(fd, level, option_name, option_value_p, sizeof(option_value));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include "EmulateInstructionARM.h"
|
||||
#include "lldb/Core/ConstString.h"
|
||||
|
||||
#include "ARMDefines.h"
|
||||
#include "ARMUtils.h"
|
||||
#include "ARM_DWARF_Registers.h"
|
||||
#include "Plugins/Process/Utility/ARMDefines.h"
|
||||
#include "Plugins/Process/Utility/ARMUtils.h"
|
||||
#include "Utility/ARM_DWARF_Registers.h"
|
||||
|
||||
#include "llvm/Support/MathExtras.h" // for SignExtend32 template function
|
||||
// and CountTrailingZeros_32 function
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include "ProcessGDBRemote.h"
|
||||
#include "ProcessGDBRemoteLog.h"
|
||||
#include "Plugins/Process/Utility/UnwindLLDB.h"
|
||||
#include "Utility/StringExtractorGDBRemote.h"
|
||||
#include "UnwindLLDB.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "UnwindMacOSXFrameBackchain.h"
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#if defined(TIOCSCTTY)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
using namespace lldb_utility;
|
||||
|
||||
|
@ -237,7 +239,7 @@ PseudoTerminal::Fork (char *error_str, size_t error_len)
|
|||
// We are done with the master in the child process so lets close it
|
||||
CloseMasterFileDescriptor ();
|
||||
|
||||
#if defined (TIOCSCTTY)
|
||||
#if defined(TIOCSCTTY)
|
||||
// Acquire the controlling terminal
|
||||
if (::ioctl (m_slave_fd, TIOCSCTTY, (char *)0) < 0)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ thread_func (void *arg)
|
|||
while (mask_access(eGet) & thread_mask)
|
||||
{
|
||||
// random micro second sleep from zero to 3 seconds
|
||||
long usec = ::random() % 3000000;
|
||||
int usec = ::rand() % 3000000;
|
||||
printf ("%s (thread = %u) doing a usleep (%li)...\n", __FUNCTION__, thread_index, usec);
|
||||
::usleep (usec);
|
||||
printf ("%s (thread = %u) after usleep ...\n", __FUNCTION__, thread_index); // Set break point at this line.
|
||||
|
|
Loading…
Reference in New Issue