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

Issue 2364903003: Suppress definition of snprintf in port_chromium.h which conflicts with base::snprintf. (Closed)

Created:
4 years, 2 months ago by gab
Modified:
4 years, 2 months ago
Reviewers:
michaeln
CC:
chromium-reviews, cmumford
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Suppress definition of snprintf in port_chromium.h which conflicts with base::snprintf. This definition breaks compile whenever a compilation unit happens to include string_util.h before port_chromium.h (as the defined base::snprintf() doesn't match the callers base::_snprintf() calls as replaced by the preprocessor)... This happened to work before when string_util.h was included after as the definition would also come out as base::_snprintf() thanks the preprocessor..! The definition doesn't appear to be needed by anything but env_chromium.cc which can use base::snprintf instead. This was discovered while adding a new header to pending_task.h which made env_mojo.cc hit a compile error: src\third_party\leveldatabase\chromium_logger.h(46): error C2039: '_snprintf': is not a member of 'base' src\base\trace_event\trace_event.h(1137): note: see declaration of 'base' after much digging, the issue was discovered to be that the new header in pending_task.h transitively caused env_mojo.cc to include string_util.h before port_chromium.h and triggered this issue. BUG=649084 Committed: https://crrev.com/cf3416047e29d074bdc135488236bd72cbd7f97b Cr-Commit-Position: refs/heads/master@{#421040}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M third_party/leveldatabase/env_chromium.cc View 4 chunks +4 lines, -3 lines 0 comments Download
M third_party/leveldatabase/port/port_chromium.h View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 17 (11 generated)
gab
Michael PTAL, thanks
4 years, 2 months ago (2016-09-23 22:35:04 UTC) #9
gab
On 2016/09/23 22:35:04, gab wrote: > Michael PTAL, thanks @michaeln: ping
4 years, 2 months ago (2016-09-26 18:52:12 UTC) #10
michaeln
lgtm
4 years, 2 months ago (2016-09-26 19:56:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2364903003/20001
4 years, 2 months ago (2016-09-26 20:45:33 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 2 months ago (2016-09-26 23:42:49 UTC) #15
commit-bot: I haz the power
4 years, 2 months ago (2016-09-26 23:45:12 UTC) #17
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/cf3416047e29d074bdc135488236bd72cbd7f97b
Cr-Commit-Position: refs/heads/master@{#421040}

Powered by Google App Engine
This is Rietveld 408576698