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

Issue 147154: Use C99 standard format macros for 64-bit values. (Closed)

Created:
11 years, 6 months ago by agl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Use C99 standard format macros for 64-bit values. Currently we have several uses of %I64d in format strings to indicate a 64-bit value. This does not work on Mac or Linux, where 'I' indicates the use of locale specific digits. Instead, we introduce base/format_macros.h which mimic the C99 standard macros for 64-bit values in a cross-platform manner.

Patch Set 1 #

Patch Set 2 : ... #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -9 lines) Patch
A base/format_macros.h View 1 1 chunk +50 lines, -0 lines 1 comment Download
M base/trace_event.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 1 chunk +3 lines, -0 lines 2 comments Download
M chrome/common/ipc_message_utils.h View 3 chunks +4 lines, -3 lines 0 comments Download
M net/base/cookie_monster.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M net/disk_cache/stats.cc View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
agl
11 years, 6 months ago (2009-06-25 17:40:17 UTC) #1
Evan Martin
+spec nazis (i kid because i love) http://codereview.chromium.org/147154/diff/1007/10 File chrome/chrome.gyp (right): http://codereview.chromium.org/147154/diff/1007/10#newcode44 Line 44: '__STDC_FORMAT_MACROS', ...
11 years, 6 months ago (2009-06-25 17:46:35 UTC) #2
Mark Mentovai
http://codereview.chromium.org/147154/diff/1007/8 File base/format_macros.h (right): http://codereview.chromium.org/147154/diff/1007/8#newcode21 Line 21: #if defined(_INTTYPES_H) && !defined(PRId64) There's no standard for ...
11 years, 6 months ago (2009-06-25 18:02:17 UTC) #3
Dean McNamee
11 years, 6 months ago (2009-06-25 20:21:37 UTC) #4
We went through all of this with V8 and decided using the header was not the
best thing to do.

Look at v8 globals.h, basically they just defined their own macros based on the
platform.  I can give you more of the background if you need it, but that's
probably what I would do for Chrome as well.

Powered by Google App Engine
This is Rietveld 408576698