[Lldb-commits] [lldb] r125199 - in /lldb/trunk: source/Core/ConnectionFileDescriptor.cpp source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp source/Utility/PseudoTerminal.cpp test/threads/main.cpp
Greg Clayton
gclayton at apple.com
Wed Feb 9 09:41:27 PST 2011
Author: gclayton
Date: Wed Feb 9 11:41:27 2011
New Revision: 125199
URL: http://llvm.org/viewvc/llvm-project?rev=125199&view=rev
Log:
Patch from Kirk Beitz to make things compile on MinGW minus the putenv part.
Modified:
lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/trunk/source/Utility/PseudoTerminal.cpp
lldb/trunk/test/threads/main.cpp
Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=125199&r1=125198&r2=125199&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Wed Feb 9 11:41:27 2011
@@ -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 @@
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));
}
Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=125199&r1=125198&r2=125199&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Wed Feb 9 11:41:27 2011
@@ -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
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=125199&r1=125198&r2=125199&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Wed Feb 9 11:41:27 2011
@@ -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"
Modified: lldb/trunk/source/Utility/PseudoTerminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/PseudoTerminal.cpp?rev=125199&r1=125198&r2=125199&view=diff
==============================================================================
--- lldb/trunk/source/Utility/PseudoTerminal.cpp (original)
+++ lldb/trunk/source/Utility/PseudoTerminal.cpp Wed Feb 9 11:41:27 2011
@@ -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 @@
// 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)
{
Modified: lldb/trunk/test/threads/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/threads/main.cpp?rev=125199&r1=125198&r2=125199&view=diff
==============================================================================
--- lldb/trunk/test/threads/main.cpp (original)
+++ lldb/trunk/test/threads/main.cpp Wed Feb 9 11:41:27 2011
@@ -60,7 +60,7 @@
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.
More information about the lldb-commits
mailing list