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

Unified Diff: base/basictypes.h

Issue 159428: Some base/ progress towards building on Linux x86-64. (Closed)
Patch Set: merge Created 11 years, 5 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 | « base/atomicops_internals_x86_gcc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/basictypes.h
diff --git a/base/basictypes.h b/base/basictypes.h
index ae87fc074e08454ab13da69adf8565a6c392cb4e..a6378e70be20748c847f41e45c24eab2183c5a43 100644
--- a/base/basictypes.h
+++ b/base/basictypes.h
@@ -25,7 +25,14 @@ typedef short int16;
#define _INT32
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__
+typedef long int64;
+#else
typedef long long int64;
+#endif
// NOTE: unsigned types are DANGEROUS in loops and other arithmetical
// places. Use the signed types unless your variable represents a bit
@@ -41,7 +48,13 @@ typedef unsigned short uint16;
#define _UINT32
typedef unsigned int uint32;
#endif
+
+// See the comment above about NSPR and 64-bit.
+#if __LP64__
+typedef unsigned long uint64;
+#else
typedef unsigned long long uint64;
+#endif
// A type to represent a Unicode code-point value. As of Unicode 4.0,
// such values require up to 21 bits.
« no previous file with comments | « base/atomicops_internals_x86_gcc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698