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

Unified Diff: src/globals.h

Issue 115252: - Fix build break on Mac OS X by using the proper formatting for pointers.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 | « SConstruct ('k') | src/platform-macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
===================================================================
--- src/globals.h (revision 1937)
+++ src/globals.h (working copy)
@@ -77,17 +77,25 @@
#define V8_UINT64_C(x) (x ## UI64)
#define V8_INT64_C(x) (x ## I64)
#define V8_PTR_PREFIX "ll"
-#else
+#else // _MSC_VER
#define V8_UINT64_C(x) (x ## UL)
#define V8_INT64_C(x) (x ## L)
#define V8_PTR_PREFIX "l"
-#endif
+#endif // _MSC_VER
#else // V8_HOST_ARCH_64_BIT
#define V8_PTR_PREFIX ""
-#endif
+#endif // V8_HOST_ARCH_64_BIT
#define V8PRIxPTR V8_PTR_PREFIX "x"
#define V8PRIdPTR V8_PTR_PREFIX "d"
+
+// Fix for Mac OS X defining uintptr_t as "unsigned long":
Dean McNamee 2009/05/13 16:40:59 I would probably structure this as an if/else with
iposva 2009/05/13 16:54:50 I sort of like your offline suggestion better abou
+#if defined(__APPLE__) && defined(__MACH__)
+#undef V8PRIxPTR
+#undef V8PRIdPTR
+#define V8PRIxPTR "lx"
+#define V8PRIdPTR "ld"
+#endif
// Code-point values in Unicode 4.0 are 21 bits wide.
typedef uint16_t uc16;
« no previous file with comments | « SConstruct ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698