Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: base/basictypes.h

Issue 6708096: 64-bit support for Mac OS X in base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/basictypes.h
===================================================================
--- base/basictypes.h (revision 78986)
+++ base/basictypes.h (working copy)
@@ -27,9 +27,12 @@
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)
wtc 2011/03/22 23:46:33 Nit: it's better to test defined(__LP64__) ins
typedef long int64;
#else
typedef long long int64;
@@ -51,7 +54,7 @@
#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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698