aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mac/macho_id.cc4
-rw-r--r--src/common/mac/macho_id.h2
-rw-r--r--src/common/md5.cc (renamed from src/common/md5.c)5
-rw-r--r--src/common/md5.h10
4 files changed, 13 insertions, 8 deletions
diff --git a/src/common/mac/macho_id.cc b/src/common/mac/macho_id.cc
index ce0ecff3..abe1fabd 100644
--- a/src/common/mac/macho_id.cc
+++ b/src/common/mac/macho_id.cc
@@ -51,6 +51,10 @@ extern "C" { // necessary for Leopard
namespace MacFileUtilities {
+using google_breakpad::MD5Init;
+using google_breakpad::MD5Update;
+using google_breakpad::MD5Final;
+
MachoID::MachoID(const char *path)
: memory_(0),
memory_size_(0),
diff --git a/src/common/mac/macho_id.h b/src/common/mac/macho_id.h
index a5338120..ccb126d4 100644
--- a/src/common/mac/macho_id.h
+++ b/src/common/mac/macho_id.h
@@ -109,7 +109,7 @@ class MachoID {
uint32_t crc_;
// The MD5 context
- MD5Context md5_context_;
+ google_breakpad::MD5Context md5_context_;
// The current update to call from the Update callback
UpdateFunction update_function_;
diff --git a/src/common/md5.c b/src/common/md5.cc
index 539bd6d2..bccf61c6 100644
--- a/src/common/md5.c
+++ b/src/common/md5.cc
@@ -17,6 +17,8 @@
#include "common/md5.h"
+namespace google_breakpad {
+
#ifndef WORDS_BIGENDIAN
#define byteReverse(buf, len) /* Nothing */
#else
@@ -244,3 +246,6 @@ static void MD5Transform(u32 buf[4], u32 const in[16])
buf[2] += c;
buf[3] += d;
}
+
+} // namespace google_breakpad
+
diff --git a/src/common/md5.h b/src/common/md5.h
index dbf4893c..e96521ee 100644
--- a/src/common/md5.h
+++ b/src/common/md5.h
@@ -5,6 +5,8 @@
#include <stdint.h>
+namespace google_breakpad {
+
typedef uint32_t u32;
typedef uint8_t u8;
@@ -14,18 +16,12 @@ struct MD5Context {
u8 in[64];
};
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
void MD5Init(struct MD5Context *ctx);
void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
-#ifdef __cplusplus
-}
-#endif
+} // namespace google_breakpad
#endif // COMMON_MD5_H__