aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-09-26 18:08:41 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-09-26 18:08:41 +0000
commit0e6f5c95d7b791c2a7d2c4056d9746f3fa1ff166 (patch)
tree1d66250ca2eb2c2591907c0dacded37792740e8e /src/google_breakpad
parentFix license boilerplate on these two files. Apparently these were missed (diff)
downloadbreakpad-0e6f5c95d7b791c2a7d2c4056d9746f3fa1ff166.tar.xz
Allow Breakpad processor library to build on Solaris with the native Sun
toolchain (#142). Patch by Alfred Peng. r=me. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@213 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad')
-rw-r--r--src/google_breakpad/processor/basic_source_line_resolver.h24
-rw-r--r--src/google_breakpad/processor/code_module.h1
-rw-r--r--src/google_breakpad/processor/minidump_processor.h1
-rw-r--r--src/google_breakpad/processor/process_state.h1
4 files changed, 27 insertions, 0 deletions
diff --git a/src/google_breakpad/processor/basic_source_line_resolver.h b/src/google_breakpad/processor/basic_source_line_resolver.h
index 2052bacb..814b01ae 100644
--- a/src/google_breakpad/processor/basic_source_line_resolver.h
+++ b/src/google_breakpad/processor/basic_source_line_resolver.h
@@ -33,14 +33,28 @@
#ifndef GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__
#define GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__
+// TODO: Platforms that have no hash_map can use map, at the likely cost of
+// performance.
+#ifdef __SUNPRO_CC
+#define BSLR_NO_HASH_MAP
+#endif // __SUNPRO_CC
+
+#ifdef BSLR_NO_HASH_MAP
+#include <map>
+#else // BSLR_NO_HASH_MAP
#include <ext/hash_map>
+#endif // BSLR_NO_HASH_MAP
#include "google_breakpad/processor/source_line_resolver_interface.h"
namespace google_breakpad {
using std::string;
+#ifdef BSLR_NO_HASH_MAP
+using std::map;
+#else // BSLR_NO_HASH_MAP
using __gnu_cxx::hash_map;
+#endif // BSLR_NO_HASH_MAP
class BasicSourceLineResolver : public SourceLineResolverInterface {
public:
@@ -65,13 +79,23 @@ class BasicSourceLineResolver : public SourceLineResolverInterface {
struct Function;
struct PublicSymbol;
struct File;
+#ifdef BSLR_NO_HASH_MAP
+ struct CompareString {
+ bool operator()(const string &s1, const string &s2) const;
+ };
+#else // BSLR_NO_HASH_MAP
struct HashString {
size_t operator()(const string &s) const;
};
+#endif // BSLR_NO_HASH_MAP
class Module;
// All of the modules we've loaded
+#ifdef BSLR_NO_HASH_MAP
+ typedef map<string, Module*, CompareString> ModuleMap;
+#else // BSLR_NO_HASH_MAP
typedef hash_map<string, Module*, HashString> ModuleMap;
+#endif // BSLR_NO_HASH_MAP
ModuleMap *modules_;
// Disallow unwanted copy ctor and assignment operator
diff --git a/src/google_breakpad/processor/code_module.h b/src/google_breakpad/processor/code_module.h
index 66cda97b..38ee956e 100644
--- a/src/google_breakpad/processor/code_module.h
+++ b/src/google_breakpad/processor/code_module.h
@@ -36,6 +36,7 @@
#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__
#include <string>
+#include "google_breakpad/common/breakpad_types.h"
namespace google_breakpad {
diff --git a/src/google_breakpad/processor/minidump_processor.h b/src/google_breakpad/processor/minidump_processor.h
index fc0024bc..73447f97 100644
--- a/src/google_breakpad/processor/minidump_processor.h
+++ b/src/google_breakpad/processor/minidump_processor.h
@@ -31,6 +31,7 @@
#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__
#include <string>
+#include "google_breakpad/common/breakpad_types.h"
namespace google_breakpad {
diff --git a/src/google_breakpad/processor/process_state.h b/src/google_breakpad/processor/process_state.h
index af95247e..afbbb193 100644
--- a/src/google_breakpad/processor/process_state.h
+++ b/src/google_breakpad/processor/process_state.h
@@ -37,6 +37,7 @@
#include <string>
#include <vector>
#include "google_breakpad/processor/system_info.h"
+#include "google_breakpad/common/breakpad_types.h"
namespace google_breakpad {