aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
commitaeffe1056f9ff6526d87a16ef55222899f5528f7 (patch)
tree1b7601a9135f82c14e73535c9d4a24f94d494662 /src/common/linux
parentWork around Windows headers #defining ERROR by renaming enum values in StackF... (diff)
downloadbreakpad-aeffe1056f9ff6526d87a16ef55222899f5528f7.tar.xz
Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/guid_creator.cc16
-rw-r--r--src/common/linux/memory_mapped_file.cc2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/common/linux/guid_creator.cc b/src/common/linux/guid_creator.cc
index 426f93a1..bfb308ee 100644
--- a/src/common/linux/guid_creator.cc
+++ b/src/common/linux/guid_creator.cc
@@ -46,14 +46,14 @@
//
class GUIDGenerator {
public:
- static u_int32_t BytesToUInt32(const u_int8_t bytes[]) {
- return ((u_int32_t) bytes[0]
- | ((u_int32_t) bytes[1] << 8)
- | ((u_int32_t) bytes[2] << 16)
- | ((u_int32_t) bytes[3] << 24));
+ static uint32_t BytesToUInt32(const uint8_t bytes[]) {
+ return ((uint32_t) bytes[0]
+ | ((uint32_t) bytes[1] << 8)
+ | ((uint32_t) bytes[2] << 16)
+ | ((uint32_t) bytes[3] << 24));
}
- static void UInt32ToBytes(u_int8_t bytes[], u_int32_t n) {
+ static void UInt32ToBytes(uint8_t bytes[], uint32_t n) {
bytes[0] = n & 0xff;
bytes[1] = (n >> 8) & 0xff;
bytes[2] = (n >> 16) & 0xff;
@@ -63,8 +63,8 @@ class GUIDGenerator {
static bool CreateGUID(GUID *guid) {
InitOnce();
guid->data1 = random();
- guid->data2 = (u_int16_t)(random());
- guid->data3 = (u_int16_t)(random());
+ guid->data2 = (uint16_t)(random());
+ guid->data3 = (uint16_t)(random());
UInt32ToBytes(&guid->data4[0], random());
UInt32ToBytes(&guid->data4[4], random());
return true;
diff --git a/src/common/linux/memory_mapped_file.cc b/src/common/linux/memory_mapped_file.cc
index 47b7eb0b..853cce57 100644
--- a/src/common/linux/memory_mapped_file.cc
+++ b/src/common/linux/memory_mapped_file.cc
@@ -97,7 +97,7 @@ bool MemoryMappedFile::Map(const char* path) {
void MemoryMappedFile::Unmap() {
if (content_.data()) {
- sys_munmap(const_cast<u_int8_t*>(content_.data()), content_.length());
+ sys_munmap(const_cast<uint8_t*>(content_.data()), content_.length());
content_.Set(NULL, 0);
}
}