[Lldb-commits] [lldb] r105798 - in /lldb/trunk: include/lldb/Core/Error.h source/Core/Error.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Jun 10 16:45:58 PDT 2010
Author: efriedma
Date: Thu Jun 10 18:45:58 2010
New Revision: 105798
URL: http://llvm.org/viewvc/llvm-project?rev=105798&view=rev
Log:
Make Error.h and Error.cpp compile on Linux.
Modified:
lldb/trunk/include/lldb/Core/Error.h
lldb/trunk/source/Core/Error.cpp
Modified: lldb/trunk/include/lldb/Core/Error.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Error.h?rev=105798&r1=105797&r2=105798&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Error.h (original)
+++ lldb/trunk/include/lldb/Core/Error.h Thu Jun 10 18:45:58 2010
@@ -11,7 +11,9 @@
#define __DCError_h__
#if defined(__cplusplus)
+#ifdef __APPLE__
#include <mach/mach.h>
+#endif
#include <stdint.h>
#include <stdio.h>
#include <string>
@@ -90,7 +92,7 @@
/// A const reference to this object.
//------------------------------------------------------------------
const Error&
- operator = (kern_return_t err);
+ operator = (uint32_t err);
~Error();
@@ -200,7 +202,7 @@
/// A mach error code.
//------------------------------------------------------------------
void
- SetError (kern_return_t err);
+ SetError (uint32_t err);
//------------------------------------------------------------------
/// Set accesssor with an error value and type.
Modified: lldb/trunk/source/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Error.cpp?rev=105798&r1=105797&r2=105798&view=diff
==============================================================================
--- lldb/trunk/source/Core/Error.cpp (original)
+++ lldb/trunk/source/Core/Error.cpp Thu Jun 10 18:45:58 2010
@@ -15,6 +15,9 @@
// Project includes
#include "lldb/Core/Error.h"
#include "lldb/Core/Log.h"
+#include <cstdarg>
+#include <cstdlib>
+#include <cstring>
#if defined (__arm__)
#include <SpringBoardServices/SpringBoardServer.h>
@@ -52,7 +55,7 @@
// Assignment operator
//----------------------------------------------------------------------
const Error&
-Error::operator = (kern_return_t err)
+Error::operator = (uint32_t err)
{
m_code = err;
m_type = eErrorTypeMachKernel;
@@ -81,7 +84,9 @@
switch (m_type)
{
case eErrorTypeMachKernel:
+#ifdef __APPLE__
s = ::mach_error_string (m_code);
+#endif
break;
case eErrorTypePOSIX:
@@ -223,7 +228,7 @@
// "eErrorTypeMachKernel"
//----------------------------------------------------------------------
void
-Error::SetError (kern_return_t err)
+Error::SetError (uint32_t err)
{
m_code = err;
m_type = eErrorTypeMachKernel;
More information about the lldb-commits
mailing list