diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:42:12 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:42:12 +0000 |
commit | a12f3755769dea04a41785657c37dc90b443caaf (patch) | |
tree | 10daa6c4581eb3964096f581ae3f49576eb942ee /base/data_pack.cc | |
parent | 99899426e812755c21398a6de8b1fe3e5fc01e90 (diff) | |
download | chromium_src-a12f3755769dea04a41785657c37dc90b443caaf.zip chromium_src-a12f3755769dea04a41785657c37dc90b443caaf.tar.gz chromium_src-a12f3755769dea04a41785657c37dc90b443caaf.tar.bz2 |
Get DataPack compiling on Mac and run its unittest.
Review URL: http://codereview.chromium.org/27152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/data_pack.cc')
-rw-r--r-- | base/data_pack.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/data_pack.cc b/base/data_pack.cc index 17db8c4..f41c6da 100644 --- a/base/data_pack.cc +++ b/base/data_pack.cc @@ -91,8 +91,14 @@ bool DataPack::Load(const FilePath& path) { bool DataPack::Get(uint32_t resource_id, StringPiece* data) { // It won't be hard to make this endian-agnostic, but it's not worth // bothering to do right now. +#if defined(__BYTE_ORDER) + // Linux check COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, datapack_assumes_little_endian); +#elif defined(__BIG_ENDIAN__) + // Mac check + #error DataPack assumes little endian +#endif DataPackEntry* target = reinterpret_cast<DataPackEntry*>( bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_, |