diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 04:11:49 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-13 04:11:49 +0000 |
commit | 6cbc30510b56b312e0ddcee83636b356d6f073ea (patch) | |
tree | 65c5af784d31d905f139317ab48622993632bcbe /sdch/logging_forward.h | |
parent | c6898666cd5fec00e919bc2ae93978ec91644a05 (diff) | |
download | chromium_src-6cbc30510b56b312e0ddcee83636b356d6f073ea.zip chromium_src-6cbc30510b56b312e0ddcee83636b356d6f073ea.tar.gz chromium_src-6cbc30510b56b312e0ddcee83636b356d6f073ea.tar.bz2 |
Remove static initializers introduced by open-vcdiff's logging.h.
I wanted to change open-vcdiff's logging.h directly, put we pull it directly
from google code, not through deps, so we can't have downstream diffs.
Maybe that's enough to eliminate all static initializers added by open-vcdiff.
BUG=94925
Review URL: https://codereview.chromium.org/68253006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sdch/logging_forward.h')
-rw-r--r-- | sdch/logging_forward.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sdch/logging_forward.h b/sdch/logging_forward.h new file mode 100644 index 0000000..fc0d327 --- /dev/null +++ b/sdch/logging_forward.h @@ -0,0 +1,22 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SDCH_LOGGING_FORWARD_H_ +#define SDCH_LOGGING_FORWARD_H_ + +// Define open-vcdiff's logging.h header guard, so that it doesn't get used. +#define OPEN_VCDIFF_LOGGING_H_ + +#include "base/logging.h" + +// open-vcdiff's logging.h includes iostream, which adds static initializers +// to several compilation units. To prevent this, provide this replacement +// header which forwards open-vcdiffs logging macros to chromium's base logging +// mechanism. +#define VCD_WARNING LOG(WARNING) +#define VCD_ERROR LOG(ERROR) +#define VCD_DFATAL LOG(DFATAL) +#define VCD_ENDL "\n" + +#endif // SDCH_LOGGING_FORWARD_H_ |