diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-22 23:28:59 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-22 23:28:59 +0000 |
commit | a50634a54e1f4e15735e7bbc5b9de74194247a9a (patch) | |
tree | 32b26cb1d1c145d6bf8fa83eb387f2a951153c3e /base | |
parent | fc4facd5d143da6ccb96619981d12e9b9fc6467c (diff) | |
download | chromium_src-a50634a54e1f4e15735e7bbc5b9de74194247a9a.zip chromium_src-a50634a54e1f4e15735e7bbc5b9de74194247a9a.tar.gz chromium_src-a50634a54e1f4e15735e7bbc5b9de74194247a9a.tar.bz2 |
64-bit support for Mac OS X in base.
BUG=44127, 18323
TEST=64-bit base should all (mostly) build
Review URL: http://codereview.chromium.org/6708096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/basictypes.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/base/basictypes.h b/base/basictypes.h index 74c0460..3b1bfba 100644 --- a/base/basictypes.h +++ b/base/basictypes.h @@ -27,9 +27,12 @@ typedef short int16; typedef int int32; #endif -// The NSPR system headers define 64-bit as |long| when possible. In order to -// not have typedef mismatches, we do the same on LP64. -#if __LP64__ +// The NSPR system headers define 64-bit as |long| when possible, except on +// Mac OS X. In order to not have typedef mismatches, we do the same on LP64. +// +// On Mac OS X, |long long| is used for 64-bit types for compatibility with +// <inttypes.h> format macros even in the LP64 model. +#if __LP64__ && !defined(OS_MACOSX) typedef long int64; #else typedef long long int64; @@ -51,7 +54,7 @@ typedef unsigned int uint32; #endif // See the comment above about NSPR and 64-bit. -#if __LP64__ +#if __LP64__ && !defined(OS_MACOSX) typedef unsigned long uint64; #else typedef unsigned long long uint64; |