aboutsummaryrefslogtreecommitdiff
path: root/src/processor/basic_source_line_resolver.cc
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/processor/basic_source_line_resolver.cc
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/processor/basic_source_line_resolver.cc')
-rw-r--r--src/processor/basic_source_line_resolver.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc
index e5d1bd7f..6baa1a8b 100644
--- a/src/processor/basic_source_line_resolver.cc
+++ b/src/processor/basic_source_line_resolver.cc
@@ -48,7 +48,9 @@
using std::map;
using std::vector;
using std::make_pair;
+#ifndef BSLR_NO_HASH_MAP
using __gnu_cxx::hash;
+#endif // BSLR_NO_HASH_MAP
namespace google_breakpad {
@@ -116,7 +118,11 @@ class BasicSourceLineResolver::Module {
private:
friend class BasicSourceLineResolver;
+#ifdef BSLR_NO_HASH_MAP
+ typedef map<int, string> FileMap;
+#else // BSLR_NO_HASH_MAP
typedef hash_map<int, string> FileMap;
+#endif // BSLR_NO_HASH_MAP
// The types for stack_info_. This is equivalent to MS DIA's
// StackFrameTypeEnum. Each identifies a different type of frame
@@ -594,8 +600,15 @@ bool BasicSourceLineResolver::Module::ParseStackInfo(char *stack_info_line) {
return true;
}
+#ifdef BSLR_NO_HASH_MAP
+bool BasicSourceLineResolver::CompareString::operator()(
+ const string &s1, const string &s2) const {
+ return strcmp(s1.c_str(), s2.c_str()) < 0;
+}
+#else // BSLR_NO_HASH_MAP
size_t BasicSourceLineResolver::HashString::operator()(const string &s) const {
return hash<const char*>()(s.c_str());
}
+#endif // BSLR_NO_HASH_MAP
} // namespace google_breakpad