Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9957)

Issue 6846047: Update protobuf for 64-bit compatibility on Mac OS X (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by Mark Mentovai
Modified:
11 years, 5 months ago
Reviewers:
xiaofeng, pliard1
CC:
protobuf_googlegroups.com
Base URL:
http://protobuf.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Update protobuf for 64-bit compatibility on Mac OS X. The system's routines from <libkern/OSAtomic.h> use int64_t as their 64-bit type. int64_t is a typedef for long long. Google's atomicops.h routines use Atomic64 as their 64-bit type. Atomic64 is a typedef for intptr_t, which is in turn a typedef for long. It isn't possible to cast from long* to long long* with const_cast, reinterpret_cast is needed. This change fixes this problem the same way Chrome fixed it in https://codereview.chromium.org/6091007 . protobuf r423 renamed GOOGLE_PROTOBUF_HOST_ARCH_64_BIT to GOOGLE_PROTOBUF_ARCH_64_BIT, but the change was not made in atomicops_internals_atomicword_compat.h.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -8 lines) Patch
M src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/google/protobuf/stubs/atomicops_internals_macosx.h View 3 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 4
Mark Mentovai
11 years, 5 months ago (2012-11-13 19:34:44 UTC) #1
pliard1
On 2012/11/13 19:34:44, Mark Mentovai wrote: LGTM, thanks Mark for fixing this! Feng asked me ...
11 years, 5 months ago (2012-11-14 12:34:10 UTC) #2
xiaofeng
On 2012/11/13 19:34:44, Mark Mentovai wrote: LGTM I'll submit this patch to protobuf trunk. Thanks ...
11 years, 5 months ago (2012-11-14 13:24:35 UTC) #3
Mark Mentovai
11 years, 5 months ago (2012-11-14 13:58:12 UTC) #4
Thanks, guys.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b