diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-11-18 21:40:27 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-11-18 21:40:27 +0000 |
commit | 84571a2b91463ec91be12699b3c28b3db456ab94 (patch) | |
tree | daa0c44846d8a218e42bc663ff2b1b58b6b0169c /src/common | |
parent | Correct bug introduced by last commit: Interface on Breakpad is incorrect. (diff) | |
download | breakpad-84571a2b91463ec91be12699b3c28b3db456ab94.tar.xz |
Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@887 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/mac/macho_id.cc | 4 | ||||
-rw-r--r-- | src/common/mac/macho_id.h | 2 | ||||
-rw-r--r-- | src/common/md5.cc (renamed from src/common/md5.c) | 5 | ||||
-rw-r--r-- | src/common/md5.h | 10 |
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__ |